How can I merge two array's?

3 次查看(过去 30 天)
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)

类别

Help CenterFile Exchange 中查找有关 Software Development Tools 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by