Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How to add Elements from a "double array" in a "specified column" of cell array ....

Asked by Priya

Priya (view profile)

on 6 Apr 2013

I have a CELL ARRAY (stored in variable "Alpha") of 20 X 10 order.

It has text say "Boy", "Girl" etc. in first column.

There is a DOUBLE ARRAY (stored in variable Beta) of 20 X 4 order.

I wish to copy the contents of its first column into second column of the CELL ARRAY.

Please help.



Priya (view profile)


No products are associated with this question.

1 Answer

Answer by the cyclist

the cyclist (view profile)

on 6 Apr 2013
Accepted answer

One possible way:

>> Alpha(:,2) = num2cell(Beta(:,1));

1 Comment


Priya (view profile)

on 21 Apr 2013


the cyclist

the cyclist (view profile)

Contact us