【发布时间】:2013-06-29 18:45:05
【问题描述】:
我有这段代码(将图像读入一个巨大的矩阵)
allImages = [];
for ii = 1 : n
img = imread( fileNames{ii} );
img = imresize( rgb2gray(img), [100 100] );
allImages = cat(3, allImages, img ); % append image to huge matrix
end
Matlab 将我指向循环中的最后一行,警告我 allIamges 在循环内增长。
那么这里有什么大不了的?
【问题讨论】:
-
@EitanT 错过了这一点。我只是标记了我的答案,要求将其移至该问题。感谢您发现重复项。
标签: performance matlab memory-management