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