Extract number from string
조회 수: 4 (최근 30일)
이전 댓글 표시
I have a coloumn of strings and I want to extract the numbers after the equal signs in an array. May I know how can I do that? Thank you.
"POINT_0_0=294.397"
"POINT_0_1=294.560"
"POINT_0_2=294.459"
"POINT_0_3=294.294"
"POINT_0_4=293.635"
댓글 수: 0
채택된 답변
dpb
2022년 5월 10일
v=str2double(extractAfter(X,'='));
is one way. For more difficult cases look at the new(ish) @doc:pattern function
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!