cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

3D Plot Question

maurice
1-Newbie

3D Plot Question

This is an issue I encounter frequently. I have 2 column vectors representing X and Y coordinates, and a matrix which represents the Z value at the coordinates X,Y. To generte a 3D plot from this I find I always need to convert the X, Y column vectors into a matrix which matches the dimenationality of Z. It seems to me there must be a more elegant way that avoids doing this.

1 REPLY 1
RichardJ
19-Tanzanite
(To:maurice)

There isn't. You either need to convert the Z matrix to a vector (which will involve also changing the X and Y vectors so they have repeated values), or the X and Y vectors to matrices. The latter is not only easier, it's better, because the interpolation used to draw the surface is more reliable with matrices (there is a very old thread somewhere that discusses this issue).

Top Tags