Plot time trace of differential equation

조회 수: 1 (최근 30일)
John O'Brian
John O'Brian 2017년 10월 29일
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개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by