Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Plotting non-linear values and solving' topicStudent Support Forum > General > Archives > "Plotting non-linear values and solving"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
10/26/12 9:53pm

In Response To 'Re: Re: Re: Re: Re: Re: Re: Re: Plotting non-li...'
---------
Use your function and Sigma Plot's coefficients.

In[8]:= fy2[x_]=(b-(Sqrt[b^2-2k^2 c x/s]))/(2k);
k = 2900000;
s = .84;

In[9]:= fy2[.79333]
Out[9]= 0.47222

In[10]:= fy2[10.313]
Out[34]= 1.32

Those seem to match your calculations.

Now a plot to see how good the fit is.

In[11]:= Show[ListPlot[data,Joined->True],
Plot[fy2[x],{x,0,10.313}],
PlotRange->All]

Out[11]= <plot snipped>

That fits the leading edge well, but nothing else.

Try FindFit with Sigma Plot's starting values.

In[12]:= k=.;s=.;
fit=FindFit[data,y2,{{k,2900000},{s,.84}},x]

Out[12]= {k-> -0.21075,s-> -0.184977}

Those are very odd results, how good is the fit?

In[13]:= k = -0.21074963872741664;
s = -0.18497695239903436;
fy2[x_] = b-(Sqrt[b^2-2 k^2 c x/s]))/(2k);
Show[ListPlot[data, Joined->True],
Plot[fy2[x], {x, 0, 10.313}],
PlotRange->All]

Out[16]= <half way decent fit to your data snipped>

From this I think you might see why the first thing I always do is plot my fitted function over the data.

At this point I don't know what else to say. If all we have to go on is your student thought the value was supposed to be about a million then I am at a loss. If you could somehow scale your y2 down by 25% then it might not be a bad approximation, but I don't have any basis for doing that. If we can somehow track down and point out a likely calculation error anywhere then I'd be happy to try to pinpoint where that is happening.

URL: ,

Subject (listing for 'Plotting non-linear values and solving')
Author Date Posted
Plotting non-linear values and solving sk597653 10/17/12 3:05pm
Re: Plotting non-linear values and solving Bill Simpson 10/17/12 11:22pm
Re: Re: Plotting non-linear values and solving sk597653 10/18/12 12:57pm
Re: Re: Re: Plotting non-linear values and solv... Bill Simpson 10/18/12 3:47pm
Re: Re: Re: Re: Plotting non-linear values and ... sk597653 10/20/12 4:47pm
Re: Re: Re: Re: Re: Plotting non-linear values ... Bill Simpson 10/22/12 02:06am
Re: Re: Re: Re: Re: Re: Plotting non-linear val... sk597653 10/23/12 10:40am
Re: Re: Re: Re: Re: Re: Re: Plotting non-linear... Bill Simpson 10/23/12 11:57pm
Re: Re: Re: Re: Re: Re: Re: Re: Plotting non-li... sk597653 10/26/12 4:22pm
Re: Re: Re: Re: Re: Re: Re: Re: Re: Plotting no... Bill Simpson 10/26/12 9:53pm
Re: Re: Re: Re: Re: Re: Plotting non-linear val... sk597653 10/23/12 11:09am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic