how to draw a temperature distribution on (x,y,z)?
2 次查看(过去 30 天)
显示 更早的评论
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?
1 个评论
回答(1 个)
Amith Kamath
2013-6-2
The image you have attached was generated using:
[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
figure
surf(X,Y,Z,'FaceColor','interp',...
'EdgeColor','none',...
'FaceLighting','phong')
daspect([5 5 1])
axis tight
view(-50,30)
camlight left
You can replace 'Z' here with the temperature data you have.
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!