How to plot Heat in 3D cartesian plane.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a 3D cartesian space. And I have a variable with respect to (x,y,z) say for ex. heat in a particular point. How do I show the variation using matlab?
3 Kommentare
Ali Daher
am 25 Jan. 2023
how did you convert the z and color vectors into matrices (as required by the surf function?)
Antworten (1)
KSSV
am 18 Jun. 2019
Let (x,y,z) be your data.
m = 100; n = 100 ;
xi = linspace(min(x),max(x),m) ;
yi = linspace(min(y),max(y),n) ;
[X,Y] = meshgrid(xi,yi) ;
Z = griddata(x,y,z,X,Y) ;
figure
pcolor(X,Y,Z) ; shading interp ; colorbar
figure
surf(X,Y,Z) ; shading interp ; colorbar
0 Kommentare
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!