Transfer All Cell Elements to a Single Vector Without For Loop

1 次查看(过去 30 天)
Hi all,
Supposed I have
a=[{[2 3]};{[3 5 4]}]
What I want is to transfer all members in "a" to vector b
b=[2 3 3 5 4]
How can I do that without "for loop" ?
I write nested loop code that can do that, but the computing time is to slow for hundreds thousands of data.
Please help. Thank you.

采纳的回答

Ameer Hamza
Ameer Hamza 2018-4-27
b = cell2mat(a)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by