What wrong with this code guys?,help me please!
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
Respuestas (2)
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
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.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


