neilofbodom
Member
Hi guys
I am trying to plot a surface plot on Matlab. My data points are in an excel file, which is read by the program and stored in respective variables. I have a set of corresponding latitude, longitude and thickness points.
This is what I tried:
filename = 'Data.xlsx';
x = xlsread(filename, 'C:C');
y = xlsread(filename, 'D
');
z = xlsread(filename, 'E:E');
[X,Y] = meshgrid(x,y);
figure
mesh(X,Y,z);
My question is, how should I rectify the error "Z must be a matrix, not a scalar or vector" please? Also, is the mesh plot tool what you would suggest?
Thanks!
I am trying to plot a surface plot on Matlab. My data points are in an excel file, which is read by the program and stored in respective variables. I have a set of corresponding latitude, longitude and thickness points.
This is what I tried:
filename = 'Data.xlsx';
x = xlsread(filename, 'C:C');
y = xlsread(filename, 'D

z = xlsread(filename, 'E:E');
[X,Y] = meshgrid(x,y);
figure
mesh(X,Y,z);
My question is, how should I rectify the error "Z must be a matrix, not a scalar or vector" please? Also, is the mesh plot tool what you would suggest?
Thanks!
Last edited: