Hi,
I have the three arrays:
[a(1) a(2) a(3)]
[b(1) b(2) b(3)]
[c(1) c(2) c(3)]
and I want to make a new array as following:
[a(1) b(1) c(1) a(2) b(2) c(2) a(3) b(3) c(3)]
I greatly appreciate any help or any idea
Thanks

댓글 수: 1

Konstantinos Sofos
Konstantinos Sofos 2015년 3월 21일
Are all of your matrices of the same dimensions?

댓글을 달려면 로그인하십시오.

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 3월 21일
편집: Azzi Abdelmalek 2015년 3월 21일

1 개 추천

out=[a;b;c];
out=out(:)'

추가 답변 (2개)

Stephen23
Stephen23 2015년 3월 21일
편집: Stephen23 2015년 3월 21일

1 개 추천

>> A = [1,2,3];
>> B = [4,5,6];
>> C = [7,8,9];
>> D = reshape([A;B;C],1,[])
D =
1 4 7 2 5 8 3 6 9
Ismaeel
Ismaeel 2015년 3월 21일

0 개 추천

Thank you so much. They were helpful, both of them.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2015년 3월 21일

답변:

2015년 3월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by