# Why do my UTM WGS84 calculations not match what MATLAB has calculated?

I have longitude and latitude data and I have converted them to UTM using WGS 84 standards. When I compare these to the UTM values generated from my lat and long they do not match. Default values for my conversion are from

`<http://www.cellspark.com/UTM.html>`

For example:

`test=defaultm('utm');utmzone=35;origin=(utmzone-31).*6+3;test.origin=[0 origin 0];test=defaultm(test);[eastutm2,northutm2]=mfwdtran(test,44.3536,28.4981);%default values taken from manual lat -> UTM conversiondiffnorth2=4912239-northutm2diffeast2=619393.56-eastutm2`

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

This difference occurs because MATLAB’s default reference ellipsoid is “International”, not “WGS 84”

Although people often use UTM with WGS 84, UTM was originally specified to work the various ellipsoids in different parts of the world, and the toolbox honors this specification.

The following code is accurate to within a few centimeters.

`mUtm=defaultm('utm');mUtm.zone = '35T';mUtm.geoid = almanac('earth','wgs84','meters');mUtm=defaultm(mUtm);[eastutm2,northutm2]=mfwdtran(mUtm,44.3536,28.4981);%default values taken from manual lat -> UTM conversiondiffnorth2=4912239-northutm2diffeast2=619393.56-eastutm2% Perform inverse mapping to verify lat and lon[lat, lon] = minvtran(mUtm, eastutm2,northutm2)`

Note that starting in MATLAB 7.14 (R2012a), it is recommended to use the wgs84Ellipsoid function instead of almanac . To do so, replace the line containing the almanac function with the following: