Plotting Phase Plane in Matlab

4 次查看(过去 30 天)
Ziv Melamed
Ziv Melamed 2018-12-6
编辑: Matt J 2021-9-12
I have solved the matrix by hand and I found the general solution. If I wanted to plot the phase plane on Matlab, how would I go about doing that?
Here is an example of the general solution for the phase plane I want to plot:
x(t)=c1e^-3t+c2e^-t
y(t)=-c1e^-3t
Both c1 and c2 are constants

回答(1 个)

Matt J
Matt J 2021-9-12
编辑:Matt J 2021-9-12
For example,
funx=@(t) c1*exp(-3*t)+c2*exp(-t);
funy=@(t) -c1*exp(-3*t);
fplot(funx,funy,[0,1])
or
t=linspace(0,1,100);
x= c1*exp(-3*t)+c2*exp(-t);
y= -c1*exp(-3*t);
plot(x,y,'x')

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by