Complete Guide: How to Install m_map in MATLAB for Stunning Maps and Geographic Visualizations





Are you eager to create captivating maps and geographical visualizations in MATLAB? Look nowhere else! With the m_map toolbox, you can access a treasure trove of mapping possibilities and bring your geospatial data to life. To begin this thrilling adventure, though, you must understand how to set up and incorporate m_map into your MATLAB workflow.


We'll walk you through installing m_map and utilizing all of its capabilities step-by-step in this extensive manual. Whether you're a seasoned researcher, scientist, or data enthusiast, learning m_map will enable you to create stunning maps and analyze geographic data precisely. Come along as we explore the world of m_map and learn about the countless opportunities it provides for mapping and data visualization projects. 


The Installation Guide

Step Number 1:

Get the m_map package file from: M_Map: A Mapping package for Matlab (ubc.ca) or here then extract it. copy the extracted folder named: m_map to your toolbox folder in your matlab installation directories. for example, in my computer i put this m_map in:

C:\Program Files\MATLAB\R2017a\toolbox



Step Number 2:

Get the ETOPO 2 or 1-minute global bathymetry/topography from it website or

here

download and unzip it in desired directories, for example place it in

C:\Program Files\MATLAB\R2017a\toolbox\m_map\data\, and then edit 4 lines in m_etopo2 to set the PATHNAME based on this desired directory.


Step Number 3:

Get the GSHHS(G) high-resolution coastline database from

https://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/.

or you can directly find the file here and do the same thing just like what you've done to ETOPO data above


Step Number 4:

set the path in MATLAB environment to access m_map by following this step 1 to 5





Done !

Now check by typing this code in your Matlab command windows:
help m_map

you should get this result:

  m_map - mapping toolbox (Author: rich@eos.ubc.ca)
  Version 1.4n  Sep-2021
 
  You have collected your data, loaded it into Matlab, analyzed 
  everything to death, and now you want to make a simple map showing 
  how it relates to the world. 
 
  But you can't. 
 
  Instead you have to figure out how to save all your data, and 
  then read it into a mapping program, and then spend all that extra 
  time figuring out why the mapping program doesn't give you what
  you expected it would...
 
  No more! 
 
                             Announcing M_Map v1.4! 
 
  M_Map is a set of mapping tools written for Matlab v5. These include: 
 
     1. Routines to project data in 18 different spherical 
        projections (and determine inverse mappings) 
     2. A grid generation routine to make nice axes with 
        limits either in long/lat terms or in planar
        X/Y terms. 
     3. A coastline database (with 1/4 degree resolution) 
     4. A global elevation database (1 degree resolution) 
     5. Hooks into freely available high-resolution coastlines and
        bathymetry/topography.
 
  M_Map v1.4 is available via the web at 
 
        http://www.eos.ubc.ca/~rich/

.... Bla ... bla... bla....so on

This tell you that your m_map is successfully installed inside your Matlab.
Now, just try it and enjoy.

Now, try this simple plot:
m_proj('miller','lon',[105 115],'lat',[-15 -7]);
[el, lg, lt] = m_etopo2([105 115 -15 -7]);
m_grid('linewi',2,'tickdir','out');
hold on;
m_contour(lg, lt, el, [0 -40 -200 -500 -1000 -3000],'color', 'black','linewi',1.5);

and tell me what you've got


If this installation guide is too brief and still makes you confused or something, please check out the other article about it here.





-myresearchxpress







myresearchxpress

Hi, i"m asep sandra, a researcher at BRIN Indonesia. I want to share all about data analysis and tools with you. Hopefully this blog will fulfill your needs.

Posting Komentar

Lebih baru Lebih lama