Hello everyone,
I'm working on an autonomous nonlinear system as shown in the pic, unfortunately i don't know how to work with matlab .. I tried to get it done myself but I couldn't reach to a solution on how to plot x1 vs x2.
assuming initial condition
x1(0) = -1
x2(0) = 2
I'm trying to plot x2 versus x1? and x1(t) vs time?
what I have done so far, which is wrong, is as followed...
using a file.m
function xp=F(t,x)
xp=zeros(2,1);
xp(1)=x(2);
xp(2)=-3*x(1)-0.6*x(2)-x.^2;
comand window:
[t,x]=ode45('F',[t0,tf],[x10,x20]);
any help would be appreciated!
Thanks in advance ..
I'm working on an autonomous nonlinear system as shown in the pic, unfortunately i don't know how to work with matlab .. I tried to get it done myself but I couldn't reach to a solution on how to plot x1 vs x2.
assuming initial condition
x1(0) = -1
x2(0) = 2
I'm trying to plot x2 versus x1? and x1(t) vs time?
what I have done so far, which is wrong, is as followed...
using a file.m
function xp=F(t,x)
xp=zeros(2,1);
xp(1)=x(2);
xp(2)=-3*x(1)-0.6*x(2)-x.^2;
comand window:
[t,x]=ode45('F',[t0,tf],[x10,x20]);
any help would be appreciated!
Thanks in advance ..
Attachments
-
4.5 KB Views: 25