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,'|')).'

추가 답변 (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