extracting only numeric part from cell array includes character and number
조회 수: 1 (최근 30일)
이전 댓글 표시
data=
'0.0253906'
'0.0292969'
'0.03125</'
'0.03125</'
'0.03125</'
'0.0058593'
'0.03125</'
'0.0117188'
'0.0117188'
'0.0234375'
data= 10x1 cell
I need to extract only numeric parts of each row of data. "</" characters of 3-5 and 7th rows need to be removed.
댓글 수: 0
채택된 답변
ES
2017년 5월 24일
You can use regular expressions on this to filter out data you need. Example
a = regexp(data,'[0-9]+.[0-9]+', 'match')%all numbers of format xyz.abc
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!