how to draw a temperature distribution on (x,y,z)?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have 3 coordinates x,y,z. For each x,y,z I have a corresponding temperature t. How can I draw it in matlab to get a "smooth" graph as in the below matlab example - graph (b)?
0 Commenti
Risposte (1)
Iman Ansari
il 9 Giu 2013
t defines color:
[x y] = meshgrid(-10:0.1:10);
z =zeros(size(x));
z(x+2*y>-9 & 2*x+y<9 & x-y>-10 & x-y<15) = 1;
t = - x + y;
s=surf(x,y,z,t);
set(s,'EdgeColor','none')
3 Commenti
Iman Ansari
il 11 Giu 2013
Here z is 3rd coordinate too, x,y and z define the shape and t defines its color:
[x y] = meshgrid(-10:0.1:10);
z = zeros(size(x));
z(x+2*y>-9 & 2*x+y<9 & x-y>-10 & x-y<15) = 1;
t = - x + y;
t(z==1) = 0;
s=surf(x,y,z,t);
set(s,'EdgeColor','none')
Vedere anche
Categorie
Scopri di più su Discrete Data Plots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!