Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'plotting several interpolating functions' topicStudent Support Forum > General > "plotting several interpolating functions"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
03/08/13 9:13pm

The size of your coefficients result in a flood of error messages from NDSolve and from Plot.

If I scale those way down then I can at least demonstrate syntax that appears to work.

In[1]:= eq=Gx+Dif n''[x]-Kr(n[x]-n0)==0;
bcs={n'[d]==0,n[0]==n0*Exp[-V]};
d=20*10^-2;Gx=10^2;n0=10^4;Dif=4*10^-3;Kr=3.1*10^-3;
Show[
Table[
sol=NDSolve[{eq,bcs},n[x],{x,0,d}, MaxSteps->50000];
Plot[n[x]/.sol,{x,0,d}],
{V,0,0.7,0.3}
]
]

Out[3]= ...ThreeOverlaidPlotsSnipped...

Check all of this very carefully to make certain that this makes sense and there are no errors. Then you can try to decide what to do to blow up your coefficients again.

URL: ,

Subject (listing for 'plotting several interpolating functions')
Author Date Posted
plotting several interpolating functions Luka 03/08/13 4:16pm
Re: plotting several interpolating functions Bill Simpson 03/08/13 9:13pm
Re: plotting several interpolating functions Bill Simpson 03/08/13 9:55pm
Re: plotting several interpolating functions Luka 03/09/13 11:58am
Re: plotting several interpolating functions Luka 03/10/13 03:13am
Re: Re: plotting several interpolating functions Bill Simpson 03/11/13 2:30pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic