Reputation: 23
Good day everyone;
I have a M*N matrix and I have two coordinate vectors X and Y, where X has the length of M and Y has the length of N but they have different values because M is an array index and X is a Latitude coordinate, for example
M=linespace(0,1000,1000)
and X=linespace(-31.291666,51.958332,1000)
and similar case for N and Y.
I want to know if there is a way to plot the same data in M * N
in a figure surface figure with axis X*Y in matlab?
Thanks a lot in advance!
Upvotes: 2
Views: 60
Reputation: 2431
Do you mean:
[a,b] = meshgrid(x,y);
% z is your 100x1000 matrix
mesh(a,b,z);
Upvotes: 2