MATLAB Answers

Error using cell2mat (line 52) CELL2MAT does not support cell arrays containing cell arrays or objects.

12 views (last 30 days)
cgenes on 21 Mar 2018
Commented: cgenes on 21 Mar 2018
HI I have a cell array {4000x1 cell, 5000x1 cell} containing strings 'nameA', 'nameB' - I want to concatenate them into 1 long character array - cell2mat does the trick if the cells are numbers - but what do you use if you have strings as in my case? thanks

Sign in to comment.

Accepted Answer

Birdman on 21 Mar 2018
cgenes on 21 Mar 2018
Hi all thanks for all your help -
in fact I had character arrays and I was using vertcat() - but it was somehow scrambling the arrays - and turning them all into numbers
anyway i've got a good hack now so works fine
thanks again

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!