Additional Information

Instead of using the onem function, create a geographic cells reference object using the georefcells function and a matrix of ones using the ones function. This example shows how to update your code.

Will be removedRecommended
[Z,refvec] = onem(latlim,lonlim,scale); R = georefcells(latlim,lonlim,1/scale,1/scale);
Z = ones(R.RasterSize);