MATLAB: Writing the matlab matrix in geotiff, whats wrong with this script

MATLABmatrix

What I am making mistake here?
basename = 'test';
rasterSize = [890 751];
refmat = makerefmat( ...
'RasterSize', rasterSize, 'Latlim', [00.00 44.50], ...
'Lonlim', [67.50 105.0250]);
R = refmatToGeoRasterReference(refmat, rasterSize);
filename = [test '.tif'];
testttif = geotiffwrite(filename, test, R);
I am getting this error Error using horzcat Dimensions of matrices being concatenated are not consistent.

Best Answer

filename = ['test', '.tif'];
Related Question