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

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

Asked by Priya 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.

0 Comments

Priya

Products

No products are associated with this question.

1 Answer

Answer by the cyclist on 6 Apr 2013
Accepted answer

One possible way:

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

1 Comment

Priya on 21 Apr 2013

Thanksss

the cyclist

Contact us