Math / Science

9K

Solutions

16

Articles & Videos

5K

Contributors

The Math / Science topic primarily includes discussions of mathematics, physics, statistics and economic analysis, but also biology, chemistry and other sciences.

Share tech news, updates, or what's on your mind.
Hi,
I am trying to check integration using two different methods, first by using [function (int)] and second by using summation. I am integration from high to low values (0.1 to 0). I got same result. However, from function I got positive value (0.005) and from summation, negative value (-0.005).  I am not sure if that because I am integrating from high to low values so I need to use (dr) in negative value when finding the integration using summation.

I used below code

`````` clear all;
clc;
syms x y
y = -x;
z=int(y,x);
v=[0:0.1/19:0.1];
dr=0.1/20;
for i=1:20
x=v(i);
kk(i)=eval(y)*(dr);
end
R1=sum(kk(1,:));
x=0.1;
z1=eval(z);
x=0;
z2=eval(z);
R2=z2-z1;
``````
0
I see this cool animated GIF that shows a prism refracting light. Can the light also go the other way, and make the light more focused?

Is it true that a prism that refracts light as well as focuses light?

https://en.wikipedia.org/wiki/Prism#/media/File:Light_dispersion_conceptual_waves.gif

Thanks
0
I am trying to rotate an object and get the following error message: 1119:access of possibly undefined property Math through a reference with a static type class. Thank you for your help

here is the code

import flash.events.MouseEvent;

function FollowMouse(event:MouseEvent):void
{
var SideY:Number = mouseY-circle.Y;
var SideX:Number = mouseY-circle.X;

var Rad:Number = Math.atan2(SideY,SideX);

var Deg:Number = Rad * 180/Math.PI;

circle.rotation = Deg;
}
0
Which is the strongest base for an antacid which works the quickest and is the most effective?
0
I'm trying to create illegal instruction reset.

I'm programming Infineon TC29x Aurix Tricore Microcontroller based embedded system in 'C' language.

I need to set program counter to illegal address, i.e. 0x00FF FFFC.  Can this be done with assembly language instructions?
If yes, please instrument assembly language instruction that would set program counter to 0x00FF FFFC while code is running.
0
I know I post a lot of article on here, but this is one you really should read.  Right now we are reaching the limits silicone.  The smallest transistors (that I have heard of) are just 7 nm (7 atoms wide).  At this point it becomes very difficult to make the transistor stable.  We are going to have to come up with a new material.  That's where quantum computing steps in.  It uses qubits , small particles that are smaller than an atom.  Unlike traditional computing, a qubit can exist as both a 1 and a 0 at the same time.  Again it is very hard to make them stable, but as we continue to increase them it will be the next big jump in computer technology.  And this one will make the jump from vacuum tubes to the transistor look like a pinprick!

http://www.tomshardware.com/news/ibm-17-qubit-quantum-computer,34434.html
0

LVL 55

Expert Comment

I think you mean silicon, not silicone.
0

Author Comment

you are correct, sorry about that.
0
a car travels 100km in 50 minutes.what will the speed be in km\h
0
I would like to implement a fast fixed point sine approximation for PIC24F microcontrollers on 16bit.
I started from here: http://www.coranac.com/2009/07/sines/
The approximation is done with polynomials: 3rd order up to 5th or even 6th order.
I am stuck in the beginning.
The 3rd order polynomial is S3(x)=(3/PI)*x-(4/PI^3)*(x^3) or S3(z)=(1/2)*z*(3-z^2) with z=x/(1/(2*PI))
I tried an Excel sheet for this function and I compared with sin() from Excel.
Either I make a mistake or the approximation error is too big.
Here is the Excel: https://goo.gl/2KJXj8
Could you help to debug this?
0
I have a client who has an issue getting the LINEST() function to work for them.  This is my first time using LINEST(), and what seemed, at first, to be straightforward has deepened considerably in levels of complexity.  I am an accomplished VBA programmer, and I feel the best way to give the client what they need is to duplicate the equation in VBA to calculate the slope (m) when there are multiple X Axes.  When only one X axis exists, I have validated LINEST against my own independent calculation, as shown by the equation below.

I am looking for a similar equation I can apply, given 2 or more X Axes.  Reproducing the underlying query in VBA will make for a much more versatile function, capable of calculating LINEST in a more wide-ranging set of circumstances than Excel currently allows, thus meeting my client's requirements.  For those not familiar with LINEST(), I have included a couple of sites that have given me the best start on solving the problem.  The office support site provided the equation, as shown above, which gave me a reliable means to have an independent check against the Excel function on a single X axis.  Every site I've seen thus far provides the LINEST() equation for multiple X Axes, but nowhere have I seen a more nuanced formula that tells me what Excel is doing to derive that number.  That's my missing piece.

Thanks, in advance, for your support.  ~ Peter Ferber

http://www.mit.edu/~mbarker/formula1/f1help/04-g-m60.htmâ€¦
0
I have a report I created that shows how many items we shipped on time, early and late. I am trying to find out the percentage of on time.

So for example the totals at the end of the report come out to  92 early 81 on time and 53 late.  What would the formula be to figure out the total percentage of on time (early counts as on time as well)?

Any help would be appreciated!
0
I am recreating a project I did over 20 years ago to calculate the mandelbrot set.  The code I have written is very simple yet is behaving strangely in two ways:

1) Where I have put in the statusLabel.text = "Working" - it does not change the value on screen.  Even if I put a sleep command in after the change, it still remains at the original value.

2) At the moment, the program will draw a block of orange pixels (haven't figured out the mathematics yet) but only if the Console.WriteLine commands are there.  If I comment them out, not a single pixel is drawn.

---
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Mandelbrot3
{
public partial class Mandelbrot : Form
{
public Mandelbrot()
{
InitializeComponent();
}

private void goButton_Click(object sender, EventArgs e)
{
int Width = 320, Height = 160, x, y, n;

Bitmap b = new Bitmap(Width, Height);
mandelbrotPanel.BackgroundImage = (Image)b;

double MinRe = -2.0;
double MaxRe = 1.0;
double MinIM = -1.2;
double MaxIM = MinIM + (MaxRe - MinRe)*Height / (this.Width);
double ReFactor = (MaxRe - â€¦
0
Hello,

I am using MATLAB  to solve equation using (syms) then evaluating the result. The program is working. However, each loop taking almost 23 second. Is there anyway that I can optimize program so it will work faster?

I used the below code
``````clear;
clc;
syms A B C D E ;
R=((4*B*A)/((D-C)^2+(B+A)^2));
R1=((4*B*A)/((D+C)^2+(B+A)^2));
F1 = ellipticK(R);
I1 = ellipticE(R);
F2 = ellipticK(R1);
I2 = ellipticE(R1);
P= ((((A*B)^(1/2))/(2*E*(R^(1/2))))*(((2 - R)*F1) -...
(2*I1)))-(((((A*B)^(1/2))/(2*E*(R1^(1/2)))))* ...
(((2 - R1)*F2) - (2*I2)));
P1=feval(symengine,'simplify',P,'IgnoreAnalyticConstraints');

X=(1/B)*(diff(P1,D));
X1=feval(symengine,'simplify',X,'IgnoreAnalyticConstraints');
[B,D]= meshgrid(linspace(0.1,10),linspace(0.1,10));
E=3;
N1 = 10*rand(100000,1);
N2 = 5*rand(100000,1);
M(:)=0;
for i=1:100000
tic
A=N1(i);C=N2(i);
F = matlabFunction(X1);
B = F(A, B, C, D, E);
In(:,:,i)=B(:,:);
fprintf('%d\n ', i);
toc
end
``````
0
435 Free Online Programming & Computer Science Courses You Can Start in June
https://medium.freecodecamp.com/free-online-courses-cs-programming-june-2017-96a4207bb182
6

LVL 26

Author Comment

True
0

LVL 1

Expert Comment

<3 FREE <3
0
We are using TC29x Microcontroller. The flash size is 6Mbytes. There are Three banks, 2Mbyte each.

Program Flash 0 (PF0) is bank 1. Program Flash 1 (PF1) is bank 2. Program Flash 2 (PF2) is bank 3.

PF0 address range is: 0x8000 0000 - 0x801F FFFF
PF1 address range is: 0x8020 0000 - 0x803F FFFF
PF2 address range is: 0x8040 0000 - 0x805F FFFF

Where is Program Flash ECC stored. Is it within 6Mbyte ? Or is there additional storage space for ECC that we don't have access to ?

How does Flash ECC work ? For how many bytes of data, how many bytes of ECC are there ? Whenever we write to flash, ECC updates? When we erase flash ECC updates?

How is it possible to create Flash ECC Error ? Because everytime you write or erase flash, ECC will update?
0
The above was gifted. what would be most ideal specifications to aim for this (for elec wire to go with this for outdoor use)? when searching for outdoor electrical wire, below are specs are needed to be filtered thru.. can you guide how you would choose in the below availability..

Cable/Wire Type: Thermostat Wire,UF-B
Guage: /10/12/14
Conductor: 2/3
Allowed Amp: 15/20/30/50
Solid or Stranded

ideally, more durable to last a few years. (mainly for summer, and possible little snow blower too)
also ideal to have feature to roll it up when not in use
0
Attached is data dump of some example symbol "ast".  This symbol starts at address 0x0000 6814.

What is oriented display and what is line break at 2 power x ?
Orient-Display.PNG
0
In a class of 40 students, everyone has either a pierced nose or a pierced ear. The professor asks everyone with a pierced nose to raise his or her hand. Nine hands go up. Then the professor asked everyone with a pierced ear to do likewise. This time there are 33 hands raised. How many students have piercings both on their ears and their noses?
0
The following problem refers to strings in A, B, ..., Z.

How many four-letter strings are there that begin with Oâ€‰?
0
Given the following definition, compute Q(5).
Q(n) =

0      if n = 0
1      if n = 1
3      if n = 2
Q(n âˆ’ 1) + Q(n âˆ’ 2) + Q(n âˆ’ 3)        if n > 2
Q(5) =
0
How many solutions (using only nonnegative integers) are there to the following equation?
x1 + x2 + x3 + x4 + x5 = 34
1

LVL 9

Expert Comment

Related update to the comment from Leonidas Dosas.
``````<HTML>
<TITLE>
Sum solution for 34 using nonnegative integers
</TITLE>
<BODY>
<TABLE border="1" height="100%" width="5%">
<TR>
<TD valign=top align=left>
x1
</TD>
<TD valign=top align=left>
x2
</TD>
<TD valign=top align=left>
x3
</TD>
<TD valign=top align=left>
x4
</TD>
<TD valign=top align=left>
x5
</TD>
<TD valign=top align=left>
Sum
</TD>
<TD valign=top align=left>
</TD>
</TR>
<script language="javascript">
var x=0,y=0,z=0,v=0,w=0;
for(var x=0;x<=34;x++)
{
for(var y=0;y<=34;y++)
{
for(var z=0;z<=34;z++)
{
for(var v=0;v<=34;v++)
{
for(var w=0;w<=34;w++)
{
if(x+y+z+v+w===34)
{
document.write("<TR>");
document.write("<TD valign=top align=left>");
CurVar=""+x;
if ( 1 == CurVar.length)
{
document.write("0"+x);
}
else
{
document.write(x);
}
document.write("</TD><TD valign=top align=left>");
if ( 1 == (""+y).length)
{
document.write("0"+y);
}
else
{
document.write(y);
}
document.write("</TD><TD valign=top align=left>");
if ( 1 == (""+z).length)
{
document.write("0"+z);
}
else
{
document.write(z);
}
document.write("</TD><TD valign=top align=left>");
if ( 1 == (""+v).length)
{
document.write("0"+v);
}
else
{
document.write(v);
}
document.write("</TD><TD valign=top align=left>");
if ( 1 == (""+w).length)
{
document.write("0"+w);
}
else
{
document.write(w);
}
document.write("</TD><TD valign=top align=left>=34</TD><TD align=left valign=top>"+AnswerCount+"</TD>");
document.write("</TR>");
}
}
}
}
}
}
document.write("<TR>");
document.write("<TD valign=top align=left colspan=7>");
document.write("</TD>");
document.write("</TR>");
</script>
</TABLE>
</BODY>
</HTML>
``````
Hence informing the following:
Answer count depends on
1. data type you are using.
2. related programming language
3. compiler whether 32 bit or 64 bit
4. related applications(either a.out or program.exe or java or browser or ...)
0

LVL 10

Expert Comment

This is a math problem how is your pc specs related!?
0
I'm in the Business Intelligence Department, but practically speaking we're the Reporting Department, your basic operational type of reports - lists, lists, and more lists.

I'm at an institution of higher learning, and a new project has come up for the Math Department. They want to know relationships between courses, grades, etc.

Examples:

- if someone gets a D in Calc I, what's the likelihood of graduation?  with various permutations, like taking Calc I again
- what's the likelihood of someone getting a D in Calc I, getting a D or F in Calc II
- for placing incoming students in Pre-Calc or Calc I, what are the factors that indicate success? such as Verbal SAT

So I think I've targeted the right discipline (Analytics), but not sure where to take this project.
0
For a birthday gift for a teen aspiring to put canon camera to good use for scenic photography and also making summer business of taking family portraits, what would be ideal camera lens to gift?

already in procession: 55-250 and 18-55.

any technical ideas on what to consider would be appreciated
0
Dear experts,

I am reading Functions and Graphs in Mathematics.

In order to draw all the polynomial equations (f(x)=x^2 +7x+12) I am looking at excel based formulae (linking to the graph).

What i am looking at is for excel which can handle input and provide the Y value and also draw the graph. In addition I should be able to overlay it shifts/compression and expansion.

Kindly help
0
HOW MANY PAIR COMBINATIONS CAN BE FROM AN 4 NUMBER

LIKE  4635
0
Explaining some of the many benefits of being able to program bacterial life via computer programming software. What we could do by understanding the genetic makeup of a bacterium, and how we would be able to program that bacterium to execute endless tasks in the future. feel free to ask questions.
0

Math / Science

9K

Solutions

16

Articles & Videos

5K

Contributors

The Math / Science topic primarily includes discussions of mathematics, physics, statistics and economic analysis, but also biology, chemistry and other sciences.