converting string data to numbers

3 vues (au cours des 30 derniers jours)
Zeus
Zeus le 21 Mar 2020
Modifié(e) : Zeus le 21 Mar 2020
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

Réponses (1)

Subhamoy Saha
Subhamoy Saha le 21 Mar 2020
Modifié(e) : Subhamoy Saha le 21 Mar 2020
Oxygen = cellfun(@str2num, Oxygen, 'UniformOutput',false)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by