In: Computer Science
i wish to solve the equations v'=v^3/3-w+i, w'=g(v+a-bw) with a=0.8, b=0.7, g=0.08, i=0.5 using ode45 in matlab. i solved in on paper but i don't know how to type the codes in matlab.
i googled this but for one unfamiliar with the code, it is hard to fathom what they are solving i also would like the code to show the plots of both variables changing with time and the phase plots of both variables.
`Hey,
Note: If you have any queries related to the answer please do comment. I would be very happy to resolve all your queries.
clc
clear all
close all
format long
a=0.8;
b=0.7;
g=0.08;
i=0.5;
f=@(t,y) [y(1)^3/3-y(2)+i;g*(y(1)+a-b*y(2))];
[T,Y]=ode45(f,[0,1],[1,2])
plot(T,Y);
figure;
plot(Y(:,1),Y(:,2));
Kindly revert for any queries
Thanks.