Message Boards Message Boards

GROUPS:

Get manipulate to work with ParametricNDSolve?

Posted 1 month ago
280 Views
|
1 Reply
|
2 Total Likes
|

Help!

I am trying to get it to cycle through different b values and it just wont work.

ClearAll["Global`*"]; Remove["Global`*"];



b = 1
Manipulate[

 {x[][][t], y[][][t], z[][][t]} /. sol2
    sol2 = 
  ParametricNDSolve[{x'[t] == Cos[t], y'[t] == Sin[t] , 
     z'[t] == b*1/4, x[0] == 0, y[0] == 1, z[0] == 0}, {x, y, z}, {t, 
     0, 100}, {a}]
   ParametricPlot3D[
    Evaluate[{x[.1][t], y[.1][t], z[.1][t]} /. sol2], {t, 1, 100}, 
    PlotRange -> All, BoxRatios -> {1, 1, 10}], {b, 1, 10}]
Manipulate[Module[{sol2}, 
  sol2=ParametricNDSolve[{x'[t]==Cos[t],y'[t]==Sin[t],z'[t]==b*1/4,x[0]==0,y[0]==1,z[0]==0},{x,y,z},{t,0,100},{a}];  
ParametricPlot3D[Evaluate[{x[.1][t],y[.1][t],z[.1][t]}/.sol2],{t,1,100},PlotRange->All,BoxRatios->{1,1,10}]],   
{b,1,10}]  

enter image description here

Not sure what x[][][t], y[][][t], z[][][t]} /. sol2 is supposed to do, but it's currently on the same line as sol2 in your code so it all runs together.

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