필터 지우기
필터 지우기

Seperate string and number

조회 수: 1 (최근 30일)
garima sharma
garima sharma 2022년 6월 3일
답변: Stephen23 2022년 6월 3일
I am reading data through serial port with a format below (char). ADC1: 123.7834 1.0139 How to separate the data? I want 123.7839 in one coloum and 1.0139 in other coloum. All are separated by space.

채택된 답변

Stephen23
Stephen23 2022년 6월 3일
T = 'ADC1: 123.7834 1.0139';
V = sscanf(T,'ADC1:%f%f',[2,Inf]).'
V = 1×2
123.7834 1.0139

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by