I have a column vector of data (23038 x 1), which corresponds to a column vector of the same length for latitude and another for longitude. I am attempting to plot this data (I have used surfm, surfacem, pcolorm), but it always causes MATLAB to slow down to the point of crashing. I assume that this is because matlab prefers the data to be oriented at a 2D matrix (grid). Is this correct, and if so how would I convert the data for plotting?
NOTE:-
Using griddata, you can mesh out your current dataset into a grid:
latmin = min(lat_piomas); latmax = max(lat_piomas); lonmin = min(lon_piomas); lonmax = max(lon_piomas); gridSize = [100 200]; latvec = linspace(latmin, latmax, gridSize(1)); lonvec = linspace(lonmin, lonmax, gridSize(2)); [LatQ LonQ] = ndgrid(latvec, lonvec); ThickQ = griddata(lon_piomas, lat_piomas, thickness, LonQ, LatQ);
From there, it's a simple matter to show the data in whichever format you like:
SEE COMPLETE ANSWER CLICK THE LINK
Comments
Post a Comment