Merge a matrix of VALUE: DOUBLE and VALUE: CELL

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

Answers (1)

Make a new cell that holds both of them:
C = {numerical_data,cell_data}
or similar

2 Comments

this kind of solves my problem. But i have my code set up in such a way that I actually need them separated until the end.
Is there any way to export the data into a new variable where they can co-exist in the same row (after the fact)?
Thanks
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'}

Sign in to comment.

Categories

Find more on Operators and Elementary Operations in Help Center and File Exchange

Asked:

on 7 Jul 2011

Community Treasure Hunt

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

Start Hunting!