在MATLAB中的内存分配时,下标的赋值维度不匹配

时间:2016-03-30 08:07:06

标签: matlab image-processing video-processing

为了优化我的代码我做了内存分配,但现在我收到了这个错误,请看看它

I(:,:,:,:)=zeros(Height,Width,3,nframes,'uint8');



for i=1:nframes

I(:,:,:,i) = read(xyloObj,i);

end

S=zeros(Height,Width,3,nframes,'uint8');

for i=2:nframes

    S(:,:,:,i)=I(:,:,:,i)-I(:,:,:,i-1);

    Q(:,:,:,i)=var(double(S(:,:,:,i)));

end

0 个答案:

没有答案