Dissect a String and create list with Matlab

1 次查看(过去 30 天)
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,'|')).'

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by