Azzera filtri
Azzera filtri

Plot time trace of differential equation

2 visualizzazioni (ultimi 30 giorni)
John O'Brian
John O'Brian il 29 Ott 2017
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!!

Risposte (0)

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by