converting string data to numbers
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
Subhamoy Saha
2020년 3월 21일
편집: Subhamoy Saha
2020년 3월 21일
Oxygen = cellfun(@str2num, Oxygen, 'UniformOutput',false)
댓글 수: 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!