Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how to asign 2 dimesion array to 3 dimension array if it is not possible then how can i assign each 2 dimension array to 3 dimension array in for loop (in matlab)

for examle math

A(1)=   1   3   5 

A(2)=   5   8   11

B(1)=    1  3   5

         5  8   11  
share|cite|improve this question
The question is not clear. Is this a programming question? Might it be better understood at a programming website than at a math website? – Gerry Myerson May 20 '12 at 12:34
up vote 1 down vote accepted

a = [1 2 3]; b =[3 4 5];

B = [a;b] will give you the answer.

share|cite|improve this answer
Thank you Nunoxic! – doci May 20 '12 at 15:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.