adding to a cell array

1 visualizzazione (ultimi 30 giorni)
Jason
Jason il 23 Lug 2011
If I have a cell array of numbers, is it possible to append to this another cell array that consists of text. The text cell array is only 1 column and I simply want to append this column to the leftmost side of the number cell array.
Thanks

Risposta accettata

Walter Roberson
Walter Roberson il 23 Lug 2011
Sure.
[TextCellArray(:), NumericCellArray]
For example,
t = {'hello','Jason'};
n = {1, 2, 3; 4, 5, 6};
[t(:),n]
The result will be
'hello' [1] [2] [3]
'Jason' [4] [5] [6]

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by