I have a 4032 X 102 matrix (first 2 columns are the coordinates). I would like to interpolate every column by a 48 X 84 meshgrid. It's working column-by-column, but it would be great if it can be done by one command (with a for loop maybe).
x = 1:84; y = 1:48;
[X,Y] = meshgrid(x,y);
Z = griddata(data(:,1),data(:,2),(:,3:102),X,Y'v4');
The input data is also grid data but not in matrix form. My goal is to create map(grid again) from this. So there are X, Y coordinates and values. Each column represent data of a map, and the values along the coordinates.
First 2 columns contain the coordinates of the data point. These are the first 2 row of a map with 4 cell spacing. Z is the gridded data matrix along the 48 x 84 grid.
Many thanks!
reshaperather than interpolate. 2) I'm still not sure what you mean by theZ(3rd argument is invalid) and "These are the first 2 row of a map with 4 cell spacing" either. - Yvon