how to fix Index exceeds matrix dimensions ?
2 次查看(过去 30 天)
显示 更早的评论
for i=1:jumlah
filename=strcat('C:\Users\Documents\MATLAB\data\dataujiKW\',num2str(i),'.jpg');
image=imread(filename);
value=cast(extraction(image),'single'); %extraction is a function
counter=counter+1;
result{counter,1}=image;
for i=1:9
result{counter,i+1}=extraction(i);
end
hasilesktraksi=[result{i,2:10}]; // error
end
but, if i run in command window with command : hasilesktraksi=[hasiluji{1,2:10}], it not error and give the result. help please, thanks
4 个评论
采纳的回答
Image Analyst
2016-5-7
hasilesktraksi=[result{i,2:10}]; // error
try this:
hasilesktraksi = extraction(1:9);
It's the same thing but avoiding using confusing cell arrays.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!