Hello,
for example there are a= [3 5 1] and b = [4 6 7]
How can I combine a and b to get c= [3 4 5 6 1 7]?

 채택된 답변

Robert U
Robert U 2022년 9월 30일

1 개 추천

Hi MIch,
have a look in the documentation under language fundamentals --> reshape()
a = [3 5 1];
b = [4 6 7];
c= reshape([a' b']',1,[])
c = 1×6
3 4 5 6 1 7
Kind regars,
Robert

추가 답변 (1개)

zhehao.nkd
zhehao.nkd 2022년 9월 30일

0 개 추천

Try reshape([a;b],1,[])

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

태그

질문:

2022년 9월 30일

댓글:

2022년 9월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by