Merge a matrix of VALUE: DOUBLE and VALUE: CELL
1 view (last 30 days)
Show older comments
Hello all,
I have two varibles in my workspace. One is of type "Double" and contain COLUMNS of NUMERICAL DATA, and the other is of type "Cell" and contains COLUMNS of data like STRINGS and qualitative notes.
I'm trying to merge this data into a single variable, with rows containing BOTH "Double" and "Cell" type data.'
THANKS!!!
-C
0 Comments
Answers (1)
Sean de Wolski
on 7 Jul 2011
Make a new cell that holds both of them:
C = {numerical_data,cell_data}
or similar
2 Comments
Oleg Komarov
on 7 Jul 2011
You cannot have a double matrix with numbers ans strings but you can have a cell array which contians both, i.e. Sean's answer.
C = {1:10,'Numbers from 1 to 10'}
See Also
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!