converting string data to numbers

조회 수: 1 (최근 30일)
Zeus
Zeus 2020년 3월 21일
편집: Zeus 2020년 3월 21일
hi there, I've separated the oxygen data set from a matrix of other data sets (measurements)
i used
rmmissing(Oxygen)
to remove the blanks and now need to convert the string to integers. Is the following correct?
Oxygen= Measurements(:,1);
%removing the extra <missing> strings
Oxygen=rmmissing(Oxygen);
%Data converted to integers
Oxygen = cellfun(@str2num, Oxygen,'UniformOutput',false)
also, how do i determine the frequency of measurements for Oxygen for measurements that are taken over a 24-hour time period?
Thanks

답변 (1개)

Subhamoy Saha
Subhamoy Saha 2020년 3월 21일
편집: Subhamoy Saha 2020년 3월 21일
Oxygen = cellfun(@str2num, Oxygen, 'UniformOutput',false)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by