I have two array and I want to merge in one . A =['test']; B= [1, 2, 3]; C= ['test', 1, 2, 3];

 채택된 답변

Adam
Adam 2015년 10월 29일

1 개 추천

{ A, B }
will merge them into a cell array as two distinct cells
[ A, num2cell( B ) ]
will give you a 4-element cell array with the elements of B each in their own cell.

추가 답변 (1개)

timo
timo 2015년 10월 29일

1 개 추천

N1 = py.list({1,2,3})
N2=py.list({'Lists in python'})
N1.append(N2)

댓글 수: 1

Muthu Annamalai
Muthu Annamalai 2015년 10월 29일
IMO - bit of an over kill, even if functional.

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

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

태그

질문:

2015년 10월 29일

댓글:

2015년 10월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by