How to plot vector from data
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I want to display 3D vectors. I got every channel in a different vector. Also Vec_X contains about 100 values and X is the axis. Vec_X(0) is the value that corresponds to X(0) Vec_X(n) to X(n).
And of course I also have Vec_Y and Y Vec_Z and Z.
What I want to do is display this as vectors. Plane XY, XZ, YZ and a 3D view of it. I started working with the matlab function quiver ( and quiver3 ). quiver(x,y,Vec_X,Vec_Y) but this doesn't work the way I want it to : It draws the vectors corresponding to the points (0,0) (1,1) (2,2) etc.. but (0,1) (0,2) etc are all missing.
Do you have an idea of what I could use ? The final objective is to find the point ( if it exists ) all these vectors are pointing at. So the graphic has to be readable.
Thanks for your help. If you have any question or if you don't understand what my objective is, I could paste some code lines :)
0 Kommentare
Antworten (3)
Sean de Wolski
am 21 Mai 2012
Do you have a data point and corresponding vectors components for each of those (0,1), (0,2) etc.?
If you don't have points defined at these lcoations they won't be drawn and to get them you would have to interpolate.
More per comment/answers
doc meshgrid
use meshgrid to generate index matrices.
0 Kommentare
Julien RUNTZ
am 21 Mai 2012
3 Kommentare
Walter Roberson
am 21 Mai 2012
Or to make your life even easier on yourself, ndgrid() instead of meshgrid()
Siehe auch
Kategorien
Mehr zu Vector Fields finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!