MATLAB: Plot 3d matric

3d matrix plots

I have a 3d-matrix for the temperature transfer of a plate T(i,j,t) i is the coordinate in the x-direction. j is the coordinate in the y-direction. t is the coordinate for the time ( in z direction). How can I plot it in a 3d- diagram (similar to the following diagram)
Thanks in advance. P/s: the plate is in 2d

Best Answer

clc; clear all ;
x = linspace(0,1) ; % your x domain
y = linspace(0,1) ; % your y domain
[X,Y] = meshgrid(x,y) ; % your domain mesh
nt = 20 ; % time steps
% loop for plotting on time
for i = 1:nt
T = rand(1)*peaks(100) ; % some temeprature
surf(X,Y,T) ;
drawnow
end