Borrar filtros
Borrar filtros

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 40000-by-1. Error in mat (line 73) C(:,s) = g(:);. how to solve this error?

1 visualización (últimos 30 días)
This is my code
lx=double(Ix);
ly=double(Iy);
lxy=double(Ixy);
lxx=double(Ixx);
lyy=double(Iyy);
g = sqrt(lx.*lx + ly.*ly);
d = sqrt( (lxx-lyy).^2+ 4*lxy.^2 );
figure, imshow(g),title('I1');
figure, imshow(d),title('I2');
s=sigma;
SI = 0.5-1/pi*atan((-lxx-lyy)./sqrt((lxx-lyy).^2+ 4*lxy.^2));
imshow(SI)
SI_label= atan_vq(SI, Ls);
SI_code(:,s) = SI_label(:);
C(:,s) = g(:);
C(:,s + 1*length(F)) = d(:);
G2=C(:,1:3);
D2=C(:,4:6); % d
r=2/pi*atan(Coef*D2./G2);
help me to solve this error.
  1 comentario
Stephen23
Stephen23 el 23 de Ag. de 2018
Editada: Stephen23 el 23 de Ag. de 2018
"help me to solve this error."
Simple: don't try to allocate 40,000 elements into one element.
Using sigma as an index looks quite suspicious to me... but in any case as we do not have the complete code, any values, or any explanation of what the badly aligned code should be doing, we will have to rely on guessing what you are doing. If you want help, please upload an MWE by clicking the paperclip button.

Iniciar sesión para comentar.

Respuestas (1)

Shan Sha
Shan Sha el 23 de Ag. de 2018
I am having many doubts in that code! shall i upload my full code

Categorías

Más información sobre Performance and Memory en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by