Plot a 4th dimension as color
Show older comments
Hello,
I'm new using matlab and I'm having some troubles, I hope someone can help me.
Until now I was working with two var functions, like F=x+y; x and y goes from 1 to 4 so I used [x,y]=meshgrid(1:0.1:4,1:0.1:4) and then run the function F to obtain the values of F 31x31 and make the plot using mesh(x,y,F).
Now I need to incorporate a new var to F, like F=x+y+z. I would like to see F as surface like in the two var case and set the z var as a color. It's possible? I have been searching the forum without luck. I have also tried doc surf and doc scatter3 but I keep getting errors =( when I try to do something with [x,y,z]=meshgrid(1:0.1:4,1:0.1:4,1:0.1:4) and F 31x31x31.
please if someone could indicate me how to make this happen, I would appreciate
Accepted Answer
More Answers (1)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!