Plot a 4th dimension as color
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
