Transfer All Cell Elements to a Single Vector Without For Loop

조회 수: 1 (최근 30일)
czeslaw
czeslaw 2018년 4월 26일
답변: Ameer Hamza 2018년 4월 27일
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에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by