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 vue (au cours des 30 derniers jours)
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;

Réponse acceptée

Luuk van Oosten
Luuk van Oosten le 2 Mar 2015
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.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by