i am executing the code below and getting the error"Index exceeds matrix dimensions. Error in principale_peppers (line 7) g=X(:,:,2)/255" can anyone help.
1 次查看(过去 30 天)
显示 更早的评论
X=imread('d:\images\peppers.bmp'); X=double(X); [l1,l2,l3]=size(X);
r=X(:,:,1)/255; g=X(:,:,2)/255; b=X(:,:,3)/255;
0 个评论
采纳的回答
Luuk van Oosten
2015-3-2
Have a look here at the answer, or any other previous answered questions regarding 'index exceeds matrix dimensions' problems around this forum.
You are trying to access a value in your matrix that does not exists.
0 个评论
更多回答(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!