Error in converting Decimals from Degree Minutes Seconds

4 ビュー (過去 30 日間)
Ahsan Abbas
Ahsan Abbas 2016 年 4 月 2 日
コメント済み: Ahsan Abbas 2016 年 4 月 2 日
Hello, I am facing problem in converting dms to dd, i have a matrix of 4x3 as shown below
i am using following command to convert in degree decimals,
angleInDegrees = dms2degrees(dms)
but i always got following error:
Need assistance ?

採用された回答

Walter Roberson
Walter Roberson 2016 年 4 月 2 日
dms2degrees([dms(:,1), floor(dms(:,2)), mod(dms(:,2),1)*60])
  1 件のコメント
Ahsan Abbas
Ahsan Abbas 2016 年 4 月 2 日
Thank you Walter Roberson

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

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 2 日
v=[33 31.15 0] % 31.15 is not allowed by Matlab, it should be an integer
out=dms2degrees(fix([33 33.15 0]))
  1 件のコメント
Ahsan Abbas
Ahsan Abbas 2016 年 4 月 2 日
Thank you Azzi Abdelmalek

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by