I am a beginner to using MATLAB, and I need a lot of help to understand what to do here.
I would like to plot multiple curves using different initial conditions to my system of ODEs.
Here is my code:
f = @(t,x) [-1*x(1)-x(3)*x(3);2*x(2);x(3)-x(2)*x(2)];
[t,xa] = ode45(f,[0 5],[-1 0 0]);
plot3(xa(:,1),xa(:,2),xa(:,3));
grid on
title('Solution curve')
Does anybody know how I could do this?
It would make plotting phase planes a lot easier.
There is no error code, I just don't know how to do it.
– Marc Nov 13 '14 at 14:23