필터 지우기
필터 지우기

How can I merge two array's?

조회 수: 1 (최근 30일)
Biza Ferreira
Biza Ferreira 2015년 10월 29일
댓글: Muthu Annamalai 2015년 10월 29일
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일
{ 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일
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.

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

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by