gpt4 book ai didi

performance - Matlab:数组在循环内增长 - 那又怎样?

转载 作者:行者123 更新时间:2023-12-04 03:26:27 25 4
gpt4 key购买 nike

<分区>

我有这段代码(将图像读入一个巨大的矩阵)

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 在循环内增长。

那么这里有什么大不了的?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com