MATLAB: Need to make a 4D plot (3D + Colour/Color)

Posted by user1305624 on Stack Overflow See other posts from Stack Overflow or by user1305624
Published on 2012-03-31T23:00:50Z Indexed on 2012/03/31 23:30 UTC
Read the original article Hit count: 198

Filed under:
|
|
|
|

I need to make a 3D surface where colour will represent the fourth variable. I know "surf" is SIMILAR to what I need, but that's not quite it. Basically, I have the following variables:

t = [1:m]

y = [1:n]

a = [1:o]

These should be the three Cartesian corodinate axes.

I also have a variable S that is of dimensions m x n x o, and is basically the amplitude, a function of the previous three variables (i.e. S = f(t,y,a)). I want this to be represented by colour.

So to summarize, I need a graph of the form (t,y,a,S), where the first three variables are vectors of unequal sizes and the final variable is a multidimensional array whose dimensions are determined by the first three.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about matlab

Related posts about colors