Message Boards Message Boards

0
|
4837 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

For loop to plot non linear equation

Posted 9 years ago

I want to plot a graph between eta and tau in the program attached with this post. But my program is giving the errors. Can someone help me to solve it?

Attachments:
POSTED BY: Shivi Sv
2 Replies
Posted 9 years ago

Thanks Sir for your reply. I have changed my program according to your suggestion but still it is giving the errors like

NDSolve::dsvar: 1 cannot be used as a variable. >> and others. Kindly suggest me accordingly.

POSTED BY: Shivi Sv
Posted 9 years ago

Eliminate your For loop, partly because your Tau is already being used in several different other ways.

f = {a[\[Tau]], k1[\[Tau]], e3e[\[Tau]]} /. NDSolve[{a'[\[Tau]]-Sqrt[A*(1-1/a[\[Tau]]^4)+B1*Log[a[\[Tau]]]] == 0, 
      k1[\[Tau]] - Sqrt[1 - wpow^2 - (4*pi*ncao3)/(3*(a[\[Tau]])^3*(1/wpeow^2 - 1/(3*(a[\[Tau]])^3)))] == 0,
      e3e[\[Tau]] - Abs[(3*k1[\[Tau]]^2*(vc)^2)/(72*(1 - wpow^2/9 - k1[\[Tau]]^2))*((4*(nco)*wpow^2)/
         ((1 - wpeow^2/(3*(a[\[Tau]])^3))^2 *4*(1 - wpeow^2/(12*(a[\[Tau]])^3))) + wpow^2)] == 0, 
      a[0] == 1.05}, {a[\[Tau]], k1[\[Tau]], e3e[\[Tau]]}, {\[Tau], 0.005}][[1]];
Plot[f[[1]], {\[Tau], 0, 0.05}, PlotStyle -> {Thickness[0.006]}, AxesLabel -> {\[Tau], a}, PlotRange -> {0, 2}]
Plot[f[[3]], {\[Tau], 0, 50*10^-3}, PlotStyle -> {Thickness[0.006]}, AxesLabel -> {\[Tau], e3e}, PlotRange -> {0, 0.3}]
POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract