how to split a number

3 Ansichten (letzte 30 Tage)
Abhiraj Gupta
Abhiraj Gupta am 26 Jun. 2019
Kommentiert: Abhiraj Gupta am 27 Jun. 2019
for eg I have this data from a gps receiver 2829.20246 in which 28 is degree value and 29.20246 is minute value.I want to convert the minute in degree decimal . So how can I seperate and process data.....????

Akzeptierte Antwort

Bjorn Gustavsson
Bjorn Gustavsson am 26 Jun. 2019
Perhaps something like this:
GPSval = 2829.20246;
GPSdeg = sign(GPSval)*floor(abs(GPSval/100));
GPSmin = GPSval - 100*GPSdeg;
Should be stable to negative values.
HTH

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by