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 ExchangeMATLAB についてさらに検索

製品

タグ

質問済み:

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