Hi Greg, Sorry about that. I moved the code to a separate file and ran it again. I received the following error.
??? CData must be an M-by-N matrix or M-by-N-by-3 array.
Error in ==> mesh at 135
hh = graph3d.surfaceplot(x,y,z,'FaceColor',fc,'EdgeColor','flat', ...
Error in ==> mesh3D...