Publisher review:utm2deg - Function to convert vectors of UTM coordinates into Lat/Lon vectors (WGS84) This function is based on UTMIP.m function by Gabriel Ruiz Martinez, but instead of providing a GUI it works with vectors of coordinates.[Lat,Lon] = utm2deg(x,y,utmzone)
Example 1:x=[ 458731; 407653; 239027; 230253; 343898; 362850];y=[4462881; 5126290; 4163083; 3171843; 4302285; 2772478];utmzone=['30 T'; '32 T'; '11 S'; '28 R'; '15 S'; '51 R'];[Lat, Lon]=utm2deg(x,y,utmzone);fprintf('.6f ',lat)40.315430 46.283902 37.577834 28.645647 38.855552 25.061780fprintf('.6f ',lon)-3.485713 7.801235 -119.955246 -17.759537 -94.799019 121.640266Example 2: If you need Lat/Lon coordinates in Degrees, Minutes and Seconds[Lat, Lon]=utm2deg(x,y,utmzone);
LatDMS=dms2mat(deg2dms(Lat))
LatDMS =40.00 18.00 55.5546.00 17.00 2.0137.00 34.00 40.1728.00 38.00 44.3338.00 51.00 19.9625.00 3.00 42.41
LonDMS=dms2mat(deg2dms(Lon))LonDMS =-3.00 29.00 8.617.00 48.00 4.40-119.00 57.00 18.93-17.00 45.00 34.33-94.00 47.00 56.47121.00 38.00 24.96
utm2deg is a Matlab script for Earth Sciences scripts design by Rafael Palacios.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris