string from a textbox
이전 댓글 표시
hi. i want to extract 4,5,6,5 from string 4x^3 + 5x^2 + 6x^1 + 5
답변 (2개)
str = '4x^3 + 5x^2 + 6x^1 + 5'
num = regexp(str,'(?<!\^)(\d)','match');
If you are using symbolic toolbox then you could use the appropriate function:
카테고리
도움말 센터 및 File Exchange에서 Operations on Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!