quiver3 not plotting the end point
42 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kevin Cardenas
el 16 de Ag. de 2020
Editada: Kevin Cardenas
el 16 de Ag. de 2020
I used the quiver3 function and was specting a vector that goes from 0,2,4 to 2,7,10. To confirm this I plotted both points but only the point 0,2,4 matches the origin of the vector, the point 2,7,10 doesn't quite match with the end of the vector. Can someone help me with this problem? Is it just a matter of positioning or what am I doing wrong?
Thanks in advance (and well sorry I kind of plotted 2 vectors the second one being from 0,2,4 to 2,4,6)
This is my code
quiver3(0,2,4,2,5,6)
axis([-10 10 -10 10 -10 10])
hold on
plot3(0,2,4,'+')
plot3(0+2,2+5,4+6,'+')
quiver3(0,2,4,2,2,2)
plot3(2,4,6,'+')
And this is the corresponding output
0 comentarios
Respuesta aceptada
KALYAN ACHARJYA
el 16 de Ag. de 2020
Editada: KALYAN ACHARJYA
el 16 de Ag. de 2020
I dont find any issue, please dont mixed up with the quiver and plot3, see your example
quiver3(0,2,4,2,5,7);
hold on;
quiver3(0,2,4,2,2,2);
axis([-10 10 -10 10 -10 10])
In both quiver plot case, draw the vecor with the components at given points. here first three digit represents the one co-ordinates (Draw the vector here), as plot is 3-D, hence you have to defined the three points (x,y,z), 2nd part with vector components. See First co-ordinates are same for both case, as it the co-ordinates for vecor origion, hence it starting the same points (initial points)
Same code
quiver3(x1,y1,z1,x2,y2,z2);
Now plot vector with components x2,y2,z2 at x1,y1,z1
Hope I get your question, if not let me know please!
3 comentarios
KALYAN ACHARJYA
el 16 de Ag. de 2020
Editada: KALYAN ACHARJYA
el 16 de Ag. de 2020
In the code having 3 plots:
Concept: quiver3(x,y,z,u,v,w) plots vectors with components (u,v,w) at the points (x,y,z)
First One:
quiver3(0,2,4,2,5,6)
Here in the figure vector with the components (2,5,6) at the point (0,2,4), which is reflectedin the figure
2nd Plot, Just a point (0,2,4) in 3d space, which is reflected, I have change the color for better visualizations
plot3(0,2,4,'ro','linewidth',2);
3rd Plot, Just an another point (2,7,10) in 3d space, which is reflected, I have change the color for better visualizations
plot3(2,7,10,'b*','linewidth',2);
And please note that the quiver start point and 2nd point having same co-ordinates, which is same reflected in the figure.
Kevin Cardenas
el 16 de Ag. de 2020
Editada: Kevin Cardenas
el 16 de Ag. de 2020
Más respuestas (0)
Ver también
Categorías
Más información sobre Vector Fields en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!