Plot time trace of differential equation
1 次查看(过去 30 天)
显示 更早的评论
Hi, I have the following code:
syms a(b) [V] = odeToVectorField(1.4*diff(a, 2) == 8*diff(a)-20*(diff(a)).^3-100*a+2.5*a.^3-4*diff(a)-1700*a); M = matlabFunction(V,'vars', {'b','Y'}); sol = ode15s(M,[0 20],[0.01 0]); fplot(@(x)deval(sol,x,1), [0, 2]);
But it plots a graph from 0 to 2 on the x-axis. I want to have it from 0 to 2000. I can change the 20 in sol = ode15s(M,[0 20],[0.01 0]); to 2000 then the 2 in fplot to 2000 also, but the graph gets too many oscillations. How can I change the scale of the x-axis to 0 to 2000 and still maintain a graph with few oscillations? Thanks!!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!