MATLAB: Is it possible to plot a function T(x,y,z,t), or even just T(x,y,z)

3d plotsheat equationMATLAB

want to plot a function T(x,y,z,t) for a x=0:pi, y=0:pi, z=0:pi, and some t=0:… Is this possible? Im trying to show heat heat dissipation in a 3D cube over time.

Best Answer

Sure, the easiest way is to represent the T value using color, using scatter3 (for discrete data), or patch/surf (for continuous data, like a function). You can further use transparency to show a fifth dimension (by modifying the 'AlphaData' property of the points), although this might be too difficult to read.
doc scatter3
doc surf