フィルターのクリア

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 Center および File ExchangeCall Python from MATLAB についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by