change floating number in a column matrix
Afficher commentaires plus anciens
I have data with DAT format file. In third column there is float 1.70141E+38, can i get change this float to 0 value?
1 commentaire
KSSV
le 10 Mai 2023
Why you want to change?
Réponses (2)
realmax('single')
ans/2
which matches the number you indicated. It is not immediately clear why anyone would use half of the maximum as a signal value, so maybe it is an accident.
Anyhow, you can try something like
YourArray(YourArray > 1.7e+38) = 0;
Steven Lord
le 10 Mai 2023
0 votes
I'm guessing whoever or whatever wrote that file intended that to be a "missing" value or it's an outlier. The functionality in MATLAB for cleaning data (the Clean Missing Data and Clean Outlier Data live tasks and the functions in the "Missing Data and Outliers" category on this documentation page) may be of use to you in removing this missing or outlier data.
Catégories
En savoir plus sur Whos dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!