change floating number in a column matrix

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?

Antworten (2)

realmax('single')
ans = single 3.4028e+38
ans/2
ans = single 1.7014e+38
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
Steven Lord am 10 Mai 2023

0 Stimmen

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.

Gefragt:

am 10 Mai 2023

Beantwortet:

am 10 Mai 2023

Community Treasure Hunt

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

Start Hunting!

Translated by