cell to vector transformation

조회 수: 1 (최근 30일)
Rica
Rica 2012년 11월 5일
hi ! I have a cell of the size 14500*1. it is composed in this way:
d={a b c 120 15 12 20 13 a b c 3 2 5 5 6 a b c .....}
three letters then five numbers.
I want to have from this cell just a vector of numbers. How to do this in matlab?

채택된 답변

Arthur
Arthur 2012년 11월 5일
편집: Arthur 2012년 11월 5일
idx = cellfun(@isnumeric,d); %find the numeric values in cellarray
out = [d{idx}]; %retrieve values from cell array

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by