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

Réponses (1)

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

2 commentaires

Christopher
Christopher le 7 Juil 2011
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
Oleg Komarov
Oleg Komarov le 7 Juil 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'}

Connectez-vous pour commenter.

Catégories

En savoir plus sur Operators and Elementary Operations dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by