how to draw a temperature distribution on (x,y,z)?

4 views (last 30 days)
D on 9 Jun 2013

Answers (1)

Iman Ansari
Iman Ansari on 9 Jun 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;
D on 11 Jun 2013
Thank you Iman.
I used function scatter3, like this: scatter3(x,y,z,[2000],t,'.'); grid off box off view(32,18); axis equal tight off vis3d; % azimuth 26 camproj perspective camlight; lighting gouraud; alpha(0.75); rotate3d on
And I got these:
The problem is that the temperature points are big (big circles) which i want to smooth out between other circles. If I make the cricles smaller, the distances between these circles are even bigger, and the picture looses its appearance:
How to overcome this? Can I maybe use interpolation, so that empty spaces between the circles could be filled out with average values?

Sign in to comment.



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by