MATLAB: Surf plot for three independent matrices of 1×360

plotsurf

Hey , I have three matrices of equal dimensions and i want to make a surf plot for it. Can someone help me with it. Basically X,Y are coordinates of the position and Z is the value at that Point. Thanks in advance for everyone who tries to help.

Best Answer

You have one matrix of three (1x360) row vectors. If your data are gridded, simply use the reshape function on each row vector to create appropriate matrices from them.
If your data are not gridded (random), use the griddata function (or similar functions) to create appropriate matrices for the surf plot.
One easy way to see if your data are gridded is to plkot them using the stem3 function. If they are gridded, that will be obvious.