What wrong with this code guys?,help me please!

<<
>>

2 comentarios

KSSV
KSSV el 22 de En. de 2018
Tell the size/ dimensions of temp and cD(jj+1)....
Jan
Jan el 22 de En. de 2018
Please post code as text, not as screen shots. Then it would be much easier to suggest a solution with copy&paste.

Respuestas (2)

Jan
Jan el 22 de En. de 2018
Notes: The "clear temp" is a waste of time, because you define the variable "temp" in the next line again. Then the former value is cleared at all.
The loop can be omitted:
temp = cat(1, cD{:});
This will produce the same error, because the dimensions of cD do not allow a concatenation along the 1st dimension.
Walter Roberson
Walter Roberson el 22 de En. de 2018
If cD is the output of a wavelet transform, then the different cD entries are going to be different sizes, and cannot be put together using cat in that form. If you needed a single vector of all of the coefficients then you could use
cell2mat( cellfun(@(V) V(:), cD(:), 'uniform', 0) )
for a one-line solution. Or in terms of loops,
temp = cD{1}(:);
for jj = 2 : dwtlevel
temp = [temp; cD{jj}(:)];
end

La pregunta está cerrada.

Etiquetas

Preguntada:

el 22 de En. de 2018

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by