cant add matrices of same dimensions
Mostrar comentarios más antiguos
im trying to add an image to a matrix of ones for which i have used the following code:
c=imread('C:\Users\Richik\Desktop\ima.png');
[x,y]=size(c)
m=ones(x,y);
g=m+c;
but even when the matrix dimensions are same,im getting this error:
??? Error using ==> plus
Matrix dimensions must agree.
i cant figure out why this is happening.....
Respuesta aceptada
Más respuestas (1)
Eng. Fredius Magige
el 12 de Oct. de 2015
0 votos
Hi It has to follow its rule, and might be g=[m,c];
1 comentario
Walter Roberson
el 12 de Oct. de 2015
That would, if it worked, append c after m, not add 1 to each element of c.
Categorías
Más información sobre Images en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!