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 Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by