Dissect a String and create list with Matlab

1 回表示 (過去 30 日間)
Lucas S
Lucas S 2019 年 5 月 2 日
コメント済み: Lucas S 2019 年 5 月 2 日
Hello !
I come from Python and i would like, with Matlab, to dissect a string and keep each part in a List. Like that :
A = "black || white || pink || yellow"
and so i would like to have
B = ["black", "white", "pink", "yellow"]
Thanks for helping !

採用された回答

Jos (10584)
Jos (10584) 2019 年 5 月 2 日
A = "black || white || pink || yellow"
B = split(erase(A,'|')).'
  1 件のコメント
Lucas S
Lucas S 2019 年 5 月 2 日
Thanks !

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by