resampling DEM using imresize in a for loop = cell array?
Mostrar comentarios más antiguos
I have a replicated, 20 'layer' DEM datacube 2380x1707x20 and want to iteratively decrease the grid resolution of each layer, while passing all outputs into a single object. It's a scaling exercise to compare resampling with smoothing.
imresize() function works well for decreasing the grid rez, and because each for loop output contains different dims I assume passing them into a single cell array is the way to go. But my approach and/or notation is off... help?
%%RESAMPLE DEM OBJECT
rast
n = 1:1:20;
for i=1:n
out{i} = imresize(rast(:,:,i), 1/i, 'Method', 'box');
end
Cell contents assignment to a non-cell array object.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!