how to write values with dms2degrees
古いコメントを表示
what i have to do is insert an excel table where the coordinates are in degrees, minutes and seconds and convert it to decimal degrees.
the table that is I structured in this way:
ellipses_points_x1 ellipses_points_y1 thickness_cm eruptive_center_x0 eruptive_center_y0 eccentricity volume_published_km3
176° 00' 45,8593 38° 51' 42,6182 200 175°59'0.1,9978 38°79'94,3831 0,74 6
176° 02' 57,5069 38° 52' 19,6326 200
176° 06' 04,0076 38° 46' 34,9070 200
176° 02' 57,5069 38° 47' 09,1154 200
175° 56' 11,5936 38° 35' 12,6413 3
175° 59' 43,6924 38° 32' 26,7981 3
data2 = T_elchichon(:,{'ellipses_points_x1'});
angleInDegrees = dms2degrees(data2);
I have to convert all these coordinates to be able to use them to calculate distances. I found the dms2degrees function but in any case if I select for example a column it does not give me the result. the mistake it gives me is
Error using dms2degrees>validateInput (line 63)
DMS input array must be real-valued.
Error in dms2degrees (line 52)
validateInput(dms)
does the excel table have to be prepared in any particular way?Can anyone help me?
thanks
4 件のコメント
ELISABETTA BILLOTTA
2022 年 10 月 31 日
移動済み: Star Strider
2022 年 10 月 31 日
It's easy:
Use
v = [176 0 45.8593]
or
vv= "176°00'45.8593""N"
Then
dms2degrees(v)
str2angle(vv)
work.
ELISABETTA BILLOTTA
2022 年 11 月 1 日
Torsten
2022 年 11 月 1 日
I have no experience with reading of string matrices and later conversion to numerical values.
Maybe someone else in the forum can help here.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!