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