What wrong with this code guys?,help me please!
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
Antworten (2)
Jan
am 22 Jan. 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
am 22 Jan. 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
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


