how to resolve the error index exceeds matrix dimensions

1 visualización (últimos 30 días)
SIBI SIVA
SIBI SIVA el 3 de Oct. de 2016
Comentada: SIBI SIVA el 16 de Oct. de 2016
k1=1;
for i=19:29
imag4=imscram(:,:,i);
subplot(:,:,i);
imshow(imag4);
[lllo,lhlo,hllo,hhlo]=dwt2(double(imag4),'haar');
llw(:,:,k1)=lllo(:,:);
lhw(:,:,k1)=lhlo(:,:);
hlw(:,:,k1)=hllo(:,:);
hhw(:,:,k1)=hhlo(:,:);
k1=k1+1;
figure
end
  1 comentario
KSSV
KSSV el 3 de Oct. de 2016
The matrices given are not known to us. How you expect to find the error?

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 3 de Oct. de 2016
If subplot() is an array, then
subplot(:,:,i);
is at best a waste of time, as that would extract a portion of the array and then throw the extracted value away because of the semi-colon. If the array had a third dimension smaller than 29, you would get an error about the index exceeding the dimension.
If subplot() is the MATLAB plotting function, then passing a colon to it is not valid.

Más respuestas (0)

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by