How to plot vectorfield in the phase portrait ..... How to modify the code....

1 view (last 30 days)
clear
figure
hold on
epsilon=0.01;omega=0.112;theta=0.14;gamma=2.54;
sys = @(t,x) [-x(1)*(x(1)-theta)*(x(1)-1)-x(2)+omega;epsilon*(x(1)-gamma*x(2))];
[t,xs] = ode45(sys,[0 100],[1 .1]);
plot(xs(:,1),xs(:,2));
x=-0.4:0.01:1.2;
plot(x,x./gamma,'r',x,omega-x.*(x-theta).*(x-1),'m')
hold off
axis([-0.4 1.2 0 0.4])
fsize=15;
set(gca,'XTick',-0.4:0.2:1.2,'FontSize',fsize)
set(gca,'YTick',0:0.1:0.4,'FontSize',fsize)
xlabel('u(t)','FontSize',fsize)
ylabel('v(t)','FontSize',fsize)
hold off
How to plot vectorfield in the phase portrait ..... How to modify the code....

Answers (0)

Categories

Find more on Cell Arrays in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!