Looking to flip plot
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello I am looking to make this plot accurate. For some reason it is spiraling clockwise when it should be spiraling counter clockwise with the same shape. Any help with this would be great.
It is basically flipped on both the x and y-axis from how it should be.
[x, y] = meshgrid(-2.5:.5:2.5, -2.5:.5:2.5);
xdot = (-1*x) + (2*y);
ydot = (-1*x) + (-3*y);
figure(1)
streamslice(x,y, xdot, ydot, 'black')
grid on
xlabel('X');
ylabel('Y');
title('#2');

0 Kommentare
Antworten (1)
Adam Danz
am 17 Nov. 2020
Flip the xdot, ydot vectors and their sign
[x, y] = meshgrid(-2.5:.5:2.5, -2.5:.5:2.5);
xdot = (-1*x) + (2*y);
ydot = (-1*x) + (-3*y);
xdot = -fliplr(xdot); % <----
ydot = -flipud(ydot); % <----
figure(1)
streamslice(x,y, xdot, ydot, 'black')
grid on
xlabel('X');
ylabel('Y');
title('#2');
axis tight
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
