0
votes

I have two arrays :

A: <500x1 cell> and
B: <500x1 single>.

A contains strings and B contains numbers.

I want to concatenate the 2 arrays to create a <500x2> array.
How can I do this?

1
[cell2mat(data1) data2]? - Divakar
@Divakar that didn't help. The contents of B got disappeared in the resulting array - Varun
Your output 500X2 would be a cell array? - Divakar
Yes. I need cell array as output - Varun

1 Answers

0
votes

This will produce a 500x2 cell array:

[A num2cell(B)]