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: Column Cell to Column matrix

Asked by Hello kity on 1 Mar 2013

Hi

I have 2 cells (or arrays??)

Cell1= 165 x 3 cell array consists of 165 rows each one is a cell

Cell2= 1 x 3 cell

i want all the cells in Cell1 (first column) to be correlated with cell2 (1,1) , Cell1 (second column) to be correlated with cell2 (1,2) and Cell1 (third column) to be correlated with cell2 (1,3)

how can i do this easiest way

2 Comments

Azzi Abdelmalek on 1 Mar 2013

What do you mean by correlated?

Azzi Abdelmalek on 1 Mar 2013

When you type

whos a b    % a and b are your 2 cell array

What you've got?

Hello kity

Products

No products are associated with this question.

1 Answer

Answer by Azzi Abdelmalek on 1 Mar 2013
a=num2cell(rand(165,3))
b=num2cell(rand(1,3))
c=[a;b]

0 Comments

Azzi Abdelmalek

Contact us