how can I solve this equation by ode45 matlab code? Here z and zdot vary with time (t = 0:0.02:3) and simulation is also made for 3 seconds. My code gives answer different than that of Simulink model prepared for the same equation.Unable to figure out the reason or my matlab code is wrong? Matlab Code is attached in file.

Equation is :

dydt = (-lambda)*(abs(zdot))*(Y)*(abs(Y)^(n-1))-(beta)*(z)*(abs(Y)^n) + ((A)*(zdot));

where,z = 2*t^2 , zdot= diff(z)

More Pankaj Sharma's questions See All
Similar questions and discussions