Phase portrait of the system in a rectangle

The two above are a system
How to display the phase portrait of the system in a rectangle Including the special point /idk if special is the correct work in english/ and how to display a tangent vector to each of the displayed not special phase curves?

1 Commento

function PhasePortrait
clc;
%data:
[x,y] = meshgrid(linspace(-1,2,20));
dx = 2*x-y-5;
dy = 3*x-2*y-9;
quiver(x, y, dx, dy)
axis([-1 1 -1 1])
% hold on
quiver(x, y, dx, dy);
title('Phase portrait')
axis tight
%plot(x(1), y(-3), "Marker","*", "Color", 'b');
end
this is what ive written by when i try to mark my specific point (1, -3) it doesnt work

Accedi per commentare.

 Risposta accettata

You can use quiver(). For example,
[x,y] = meshgrid(linspace(-1,1,20));
dx = 2*x-y-5;
dy = 3*x-2*y-9;
quiver(x, y, dx, dy)
axis([-1 1 -1 1])

10 Commenti

Okay, thank you, but how to display the tangent vector to each of the displayed not special phase curves?
It shows tangent vectors. Can you show an example?
No, i dont have an example. so my specific point ot whatever its called in english is (1, -3), but how to mark it with a star? the task says to each of the not special phase curves to draw a tangent vector
This show how you can mark the specific point
[x,y] = meshgrid(linspace(-5,5,20));
dx = 2*x-y-5;
dy = 3*x-2*y-9;
quiver(x, y, dx, dy)
axis([-5 5 -5 5])
hold on
plot(1, -3, '*', 'MarkerSize', 8, 'LineWidth', 1)
Okay thank you again! so the only left thing to do is the tangent vectors to each of the displayed not special phase curves
Can you manually draw on the image to show which point you want?
Stefani Stefanova
Stefani Stefanova il 26 Dic 2020
Modificato: Stefani Stefanova il 26 Dic 2020
I think they want something like this:
i have already displayed the litlle red vectors and now i have to displya the black vectors but how?
and also my little red vectors are in one direction, the pic is just for an example
Try this
[x,y] = meshgrid(linspace(-5,5,10));
dx = 2*x-y-5;
dy = 3*x-2*y-9;
quiver(x, y, dx, dy);
hold on
streamline(x, y, dx, dy, [-5:0.4:5 -5:0.4:5], [5*ones(1,26) -5*ones(1,26)])
axis([-5 5 -5 5])
plot(1, -3, '*', 'MarkerSize', 8, 'LineWidth', 1)
THANK YOU SO SO SO MUCH!!!!! That really helped me!
I am glad to be of help!!!

Accedi per commentare.

Più risposte (0)

Categorie

Community Treasure Hunt

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

Start Hunting!

Translated by