How to plot vector from data
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(3 个)
Sean de Wolski
2012-5-21
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 个评论
Julien RUNTZ
2012-5-21
3 个评论
Walter Roberson
2012-5-21
Or to make your life even easier on yourself, ndgrid() instead of meshgrid()
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Vector Fields 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!