Plot time trace of differential equation
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!