how to split a number

3 ビュー (過去 30 日間)
Abhiraj Gupta
Abhiraj Gupta 2019 年 6 月 26 日
コメント済み: Abhiraj Gupta 2019 年 6 月 27 日
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.....????

採用された回答

Bjorn Gustavsson
Bjorn Gustavsson 2019 年 6 月 26 日
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
  1 件のコメント
Abhiraj Gupta
Abhiraj Gupta 2019 年 6 月 27 日
Thanks for the reply.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by