Dissect a String and create list with Matlab

1 visualización (últimos 30 días)
Lucas S
Lucas S el 2 de Mayo de 2019
Comentada: Lucas S el 2 de Mayo de 2019
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 !

Respuesta aceptada

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

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by