문제

I have data on the form (x, y, z, v), in other words three spatial coordinates and one velocity magnitude. I would like to plot this in 3D, where the velocity magnitude is shown using color.

What is the best way to do this in MATLAB?

도움이 되었습니까?

해결책

I assume you have trajectory data, so that your spatial coordinates represent the trajectory through space of one or more particles. In that case:

Have a look at quiver3 or coneplot.

If you want colored arrows, then have a look at quiver3d or quiverc (2D only) on the File Exchange.

If you only have 3 spatial coordinates and speed (= velocity magnitude), then your best bet is scatter3.

I could go on, but could you give me a bit more detail on what you want exactly?

다른 팁

Have you tried surf(x,y,z,v)?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top