what wrong in my for loop?

Sir, Please help, where I'm wrong in the following code. I got an error like this .. Subscripted assignment dimension mismatch.
Error in one (line 15) target(:,i)=img_size(:); Please help me sir..
imgData=imageSet(filename,'recursive')
count = numel(imgData)
for i=1:count
img=read(imgData(i),1);
img_size=imresize(img,[100 100]);
img_size=double(img_size);
target(:,i)=img_size(:);
end

5 件のコメント

Torsten
Torsten 2018 年 1 月 29 日
"img_size" is a two-dimensional array. But in the last line within the for-loop, you treat it as one-dimensional.
Best wishes
Torsten.
Maruthi Maruthi
Maruthi Maruthi 2018 年 1 月 29 日
Sir, Please tell me how can I modify the statement.. I 'm very beginner to matlab
Torsten
Torsten 2018 年 1 月 29 日
target{i} = img_size ?
Best wishes
Torsten.
Maruthi Maruthi
Maruthi Maruthi 2018 年 1 月 29 日
Sir, the above code showing the following error
Cell contents assignment to a non-cell array object.
Error in username_gpwd_net (line 15) target{i}=img_size(:);
Maruthi Maruthi
Maruthi Maruthi 2018 年 1 月 29 日
Thank you very much sir, I got it..

回答 (0 件)

この質問は閉じられています。

タグ

質問済み:

2018 年 1 月 29 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by