how to plot implicit functions, witch given as matrix?

I have this code
[t1, X] = ode23('vdpol', tspan, x0); [t2, Y] = ode23('vdpol', tspan, y0);
and I want to plot trajectories of points - 2D plot, shows Y(X) functions. But t1 and t2 are not the same time vectors, sometimes they have different sizes. Is any way to "approximate" X and Y vectors to plot then.

回答 (1 件)

Star Strider
Star Strider 2018 年 7 月 4 日

0 投票

‘... t1 and t2 are not the same time vectors ...’
You can make them be the same (for all intents and purposes) by defining ‘tspan’ as a vector of more than 2 elements.
This:
tspan = linspace(0, 10, 25);
creates ‘tspan’ as a vector going from 0 to 10, and having 25 elements. The ODE solvers will report solutions at each element of ‘tspan’.

カテゴリ

ヘルプ センター および File ExchangeNumerical Integration and Differential Equations についてさらに検索

質問済み:

2018 年 7 月 4 日

回答済み:

2018 年 7 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by