Error using + Matrix dimensions must agree

2 visualizaciones (últimos 30 días)
Mostfa Abd El-Aziz
Mostfa Abd El-Aziz el 8 de Nov. de 2021
Comentada: yanqi liu el 10 de Nov. de 2021
RGB=real(DFT)+WMI;
  6 comentarios
Steven Lord
Steven Lord el 8 de Nov. de 2021
Yes, I agree that likely the dimensions don't agree. Seeing the size of each array may give us some insight into what the cause of that discrepancy may be and suggest a solution. For instance, if both are vectors but one is one element shorter I'd ask if they called diff to create the shorter vector. If one is a vector and the other has the same number of elements but is a different shape, calling reshape may be what the poster wants.
Mostfa Abd El-Aziz
Mostfa Abd El-Aziz el 9 de Nov. de 2021
how to call reshape?

Iniciar sesión para comentar.

Respuestas (1)

yanqi liu
yanqi liu el 9 de Nov. de 2021
RGB=real(DFT)+imresize(WMI,[size(DFT,1) size(DFT,2)], 'bilinear');
  4 comentarios
Mostfa Abd El-Aziz
Mostfa Abd El-Aziz el 9 de Nov. de 2021
It is run good for this code line
but the next code line :
DFT_W=complex(RGB,imag(DFT));
display also an error which : "Error using complex Input arrays must have the same size.""
yanqi liu
yanqi liu el 10 de Nov. de 2021
yes, sir, may be upload mat file to analysis

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by