What wrong with this code guys?,help me please!
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论

<<

>>

回答(2 个)
Jan
2018-1-22
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.
0 个评论
Walter Roberson
2018-1-22
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
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!