MATLAB: 3D plot from imported Excel data

3d plotsimporting excel dataMATLABmesh

I have data in an Excel file with # columns. I would like to import the first three columns into Matlab and create a 3D mesh of this data however, I am getting an error. Below is what I have tried. Is there a different method I should use?
Test = xlsread('test.xls', 'A19283:C19300') ; %I tested the code by importing a small section of the data from my excel file named 'test'.
x=test(:,1); % x contains the 1st column of ‘test’
y=test(:,2); % y contains the 2nd column of ‘test’
[X Y]=meshgrid(x,y);
Z=test(:,3:size(test,2));
mesh(X,Y,Z)
I get: “Error using ==> mesh at 80 Z must be a matrix, not a scalar or vector.”

Best Answer

Below is what I have done thus far.I am using the trisurf function but this connects the data points as lines, but I want each data point to be plotted separately. Any suggestions? I don't think I can use the command above about "foo" because it requires there to be a relationship between z and x and y but my data is completely random. For some background, the data I have is from a fatigue test on a material that is being pulled in the y-direction but there is some deformation in the x and z directions as well and the data I want to plot are teh x,y,z locations of the material.
function plot3Ddata(x,y,z)
test = xlsread('test.xls', 'A1:C216825');
x=test(:,1);
y=test(:,2);
z=test(:,3);
tri = delaunay(x,y);
trisurf(tri,x,y,z);
end