error in using cell2mat function while the level of decomposition is greater than 1

i am doing project in dual tree complex wavelet transform where at each level of decomposition a cell array containing 6 complex valued high freq components are obtained. the function cell2mat works when the level of decomposition is 1 (ie) i get a 1x1 cell array. but when the level of decomposition is greater than 1 ( if the level of decomposition is 2 i get a 2x1 cell array and a 3x1 cell array if the level of decomposition in 3 and so on) i get the following error..
??? Error using ==> cat CAT arguments dimensions are not consistent.
Error in ==> cell2mat at 89 m{n} = cat(1,c{:,n});
Error in ==> ncb at 23 e=cell2mat(h);
please help me to solve this

Answers (2)

I assume you can perform this:
e = cell2mat(h(1));
I do not have the wavelet toolbox, therefore I cannot try it. Please post the exact type and size of the input and the wanted output.
You can do:
c = {1, 2, 3};
c = {[1;2], [2;3], [3;4]};
cell2mat(c)
You can't do:
c = {[1;2], 2, 3};
c = {{1} , 2, 3};
cell2mat(c)
Oleg

This question is closed.

Asked:

on 17 Mar 2011

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!