error: assignment dimension mismatch
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
mohamad mohamad
el 15 de Mzo. de 2014
Editada: mohamad mohamad
el 15 de Mzo. de 2014
I=imread('data (15).tif'); % Read an image
IG = rgb2gray(I);
[M,N] = size(IG);
G(:,:,2) = I(:,:,2);
G(:,:,1) = 0;
G(:,:,3) = 0;
Y = rgb2gray(G);
i have a image data base and when i run this code on my images,it work well on all of them except 2 of them which are horizontal images and biger then others,can any one help me plz? this is the error :
Subscripted assignment dimension mismatch.
Error in main (line 13) G(:,:,2) = I(:,:,2);
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 15 de Mzo. de 2014
Try
clear G
G(:,:,2) = I(:,:,2);
G(:,:,1) = 0;
G(:,:,3) = 0;
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Convert Image Type en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!