MATLAB: Solving non linear differential equations differential equationsmathematicsMATLAB I am working at a mathematical problem and I wanted to solve it numerically through MATLAB. The equation has the form: epsilon*y'(t) =t*y(t)(y(t)-a)(y(t)-b)+c where a<0 and b>0 and c>0 Best Answer a = -0.2;b = 0.1;c = 0.1;epsilon = 1.0;fun = @(t,y)(t*y*(y-a)*(y-b)+c)/epsilon;tspan = [0 3.5];y0 = 0;[T,Y] = ode45(fun,tspan,y0);plot(T,Y) Related SolutionsMATLAB: Runge-Kutta problem command ode45 I have no idea what you want to do, or what ‘x’ and ‘y’ are. This will get you closer to an actual result: tspan = [0 5];y0 = [100; 0];Q = 30; b = 0.2;[t,y] = ode45(@(t,y) [y(1); Q-b*y(1)*y(2)], tspan, y0); figureplot (t,y,'-o'). MATLAB: Solving a ODE in matlab ode = @(t,y) y.^2-y.*0.1*cos(2.*t)-0.2*cos(2.*t);t=[0 8];y0 = -1;[t,y] = ode45(ode,t,y0);plot(t,y) Related QuestionHow to plot ODE function and I don’t get this plot.Second Order, Piecewise ODE helpConditional variables with running ODE45Error using exp Too many input arguments.
Best Answer