how to draw a temperature distribution on (x,y,z)?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Iman Ansari
el 9 de Jun. de 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 comentarios
Iman Ansari
el 11 de Jun. de 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')
Ver también
Categorías
Más información sobre Discrete Data Plots en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!