3D Figures rendering incorrectly

I've been trying to do some 3d graphs (mesh and scatter3 mostly) of some data. The data I'm using is in the form of a dataset of doubles. I pull individual columns from this dataset and use them as vectors for the graphing functions. However, I noticed that the functions are just rendering the data completely wrong. For instance, a point that should be at 233 is rendered at around 160. another point that should be at 9, is rendered at 50. This occurs across all axes, not just one. Interestingly enough, if I go into plot tools and reverse the axes, they render correctly, but of course a graph with all 3 axes reversed is not very helpful. Does anyone have any idea as to what is going on here?
I am just using the functions as given in the documentation. example:
scatter3(mvocaldur34, afftodur34, asslodur34);
where mvocal, affto etc are all vectors of doubles.

回答(1 个)

hi,
you mean you exchange the axis x->y and y->x ? if thats the case then change the order :
scatter3(afftodur34,mvocaldur34,asslodur34);

2 个评论

no.. I have not confused which vectors to put on which axes, I mean that matlab is rendering the coordinates completely wrong
oh sorry then, but i think the scatter is correct
%eg:
t=0:0.01:2*pi;
x=cos(2*pi*t);
y=sin(2*pi*t);
scatter3(x,y,t)
anyway if you found a bug, send them an email

请先登录,再进行评论。

提问:

2013-3-14

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by