Dissect a String and create list with Matlab

1 visualizzazione (ultimi 30 giorni)
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 !

Risposta accettata

Jos (10584)
Jos (10584) il 2 Mag 2019
A = "black || white || pink || yellow"
B = split(erase(A,'|')).'

Più risposte (0)

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by