% VALSURF.M Plot the surface from the diffusion model
clf; % Clear the current figure
surf(AllValues) % Plot the surface
colormap(jet) % Change the colormap
view(0,90) % Set the viewpoint to be above
colorbar % Show a colorbar which has the values
xlabel('Time Step') % Label the axes
ylabel('Position')
Experiment with other views of the same surface by
typing in a command such as view(150,30) (the first arguement
is the rotation angle of the XY plane around the Z axis, and the second
arguement is the view angle above the XY plane.
[ValMax LocMax] = max(Values);
will store the maximum value of the array Values in the
variable ValMax and the location in the array (the element
number) in LocMax