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 comentario

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

Iniciar sesión para comentar.

 Respuesta aceptada

Ameer Hamza
Ameer Hamza el 26 de Dic. de 2020
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 comentarios

Stefani Stefanova
Stefani Stefanova el 26 de Dic. de 2020
Okay, thank you, but how to display the tangent vector to each of the displayed not special phase curves?
Ameer Hamza
Ameer Hamza el 26 de Dic. de 2020
It shows tangent vectors. Can you show an example?
Stefani Stefanova
Stefani Stefanova el 26 de Dic. de 2020
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)
Stefani Stefanova
Stefani Stefanova el 26 de Dic. de 2020
Okay thank you again! so the only left thing to do is the tangent vectors to each of the displayed not special phase curves
Ameer Hamza
Ameer Hamza el 26 de Dic. de 2020
Can you manually draw on the image to show which point you want?
Stefani Stefanova
Stefani Stefanova el 26 de Dic. de 2020
Editada: Stefani Stefanova el 26 de Dic. de 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
Ameer Hamza
Ameer Hamza el 26 de Dic. de 2020
Editada: Ameer Hamza el 26 de Dic. de 2020
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)
Stefani Stefanova
Stefani Stefanova el 26 de Dic. de 2020
THANK YOU SO SO SO MUCH!!!!! That really helped me!
Ameer Hamza
Ameer Hamza el 27 de Dic. de 2020
I am glad to be of help!!!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Polar Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 26 de Dic. de 2020

Comentada:

el 27 de Dic. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by