## Convert from geographic to geomagnetic coordinates

Version 1.0.0 (1.52 KB) by
A MATLAB function that converts from geographic to geomagnetic coordinates

Updated 19 Nov 2021

This is a MATLAB function that computes the geomagnetic latitudes of a location using the geographic coordinates of the location.
The syntax is:
geom_lat = geog2geom(geog_lat, geog_long, height, decimalYear)
The inputs are:
geog_lat: Geographic latitude, specified as a scalar or vector, in degrees. North latitude is positive and south latitude is negative.
geog_long: Geographic longitude specified as a scalar or vector, in degrees. East longitude is positive and west longitude is negative.
height: Distance from the surface of the Earth, specified as a scalar or vector, in meters.
decimalYear: Year, in decimal format, specified as a scalar or vector. This value can have any fraction of the year that has already passed.
The geog_lat, geog_long, height, and decimalYear arguments must all be the same size (scalars or vectors).
The output is:
geom_lat: Geomagnetic latitude, specified as a scalar or vector, in degrees. North latitude is positive and south latitude is negative.
The size of geom_lat is same as the size of each of the inputs

### Cite As

Daniel Okoh (2023). Convert from geographic to geomagnetic coordinates (https://www.mathworks.com/matlabcentral/fileexchange/102219-convert-from-geographic-to-geomagnetic-coordinates), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2019b
Compatible with R2015b and later releases
##### Platform Compatibility
Windows macOS Linux
{"ft_lang_label":"__label__en","ft_lang_prob":0.68823045,"math_prob":0.88611573,"size":1846,"snap":"2022-40-2023-06","text_gpt3_token_len":404,"char_repetition_ratio":0.1194354,"word_repetition_ratio":0.15830116,"special_character_ratio":0.20314193,"punctuation_ratio":0.14984709,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95888525,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-01-27T18:27:34Z\",\"WARC-Record-ID\":\"<urn:uuid:97701a35-27f5-40af-b443-3fb91f5f5b0b>\",\"Content-Length\":\"87437\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:cabc951b-bfbf-4b8b-af29-f2f04f6833ff>\",\"WARC-Concurrent-To\":\"<urn:uuid:71b76dab-e746-46e2-a22b-961d700f5354>\",\"WARC-IP-Address\":\"104.86.80.92\",\"WARC-Target-URI\":\"https://it.mathworks.com/matlabcentral/fileexchange/102219-convert-from-geographic-to-geomagnetic-coordinates?s_tid=prof_contriblnk\",\"WARC-Payload-Digest\":\"sha1:ROSACZWWLHXHOTMCVRSPIBSMRPY7HDVQ\",\"WARC-Block-Digest\":\"sha1:G3BZJ2JCWRXWSVJPP5IAQHAHJEAYYWEI\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764495001.99_warc_CC-MAIN-20230127164242-20230127194242-00589.warc.gz\"}"}