Cell to mat conversion (read only values before semicolon)

Hi,
I have the 100 x 1 cell as shown in fig. Here, for instance, row 26 got two set of entries seperated by semicolon, I would need to extract only the first entry (i.e. before semicolon). Please help me with this
Attached the cell for the refrence..
[16.3910000000000,45.1991000000000,NaN,NaN;17.8641192873838,43.2304501628507,NaN,NaN]

 採用された回答

madhan ravi
madhan ravi 2020 年 9 月 8 日

0 投票

cell2mat(cellfun(@(x) x(1, :), cell_array, 'un', 0))

1 件のコメント

Turbulence Analysis
Turbulence Analysis 2020 年 9 月 8 日
Thanks a lot @ madhan ravi.. It works perfectly..

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by