Matlab的m_map工具箱函数说明%---------------------------------------地磁坐标%lat=[25*ones(1,100)50*ones(1,100)25];%lon=[-99:00:-1:-99-99];%clf%subplot(121);%m_coord('IGRF2000-geomagnetic');%Treatalllat/longsasgeomagnetic(地磁坐标)%m_proj('stereographic');%立体投影%m_coast;%m_grid;%m_line(lon,lat,'color','r');%lat/lnassumedgeomagneticonthegeomagneticmap%m_coord('geographic');%Switchtoassuminggeographic(地理坐标)%m_line(lon,lat,'color','c');%Nowtheyaretreatedasgeographic%subplot(122);%m_coord('geographic');%Defineallingeographic%m_proj('stereographic');%m_coast;%m_grid;%m_line(lon,lat,'color','c');%m_coord('IGRF2000-geomagnetic');%Nowassumethatvaluesareingeomagnetic%m_line(lon,lat,'color','r');%---------------------------------------------------画轨迹线%m_proj('UTM','long',[-72-68],'lat',[4044]);%m_gshhs_i('color','k');%m_grid('box','fancy','tickdir','out');%fakeupatrackline%lons=[-71:.1:-67];%lats=60*cos((lons+115)*pi/180);%dates=datenum(1997,10,23,15,1:41,zeros(1,41));%m_track(lons,lats,dates,'ticks',0,'times',4,'dates',8,...%'clip','off','color','r','orient','upright');%--------------------------------------------------改变坐标%[X,Y]=m_ll2xy(LONG,LAT,...optionalclippingarguments)%[LONG,LAT]=m_xy2ll(X,Y)%DIST=m_lldist([2030],[4445])%计算两点之间的距离%--------------------------------------------------以某点为中心画半径%m_proj('lambert','long',[-160-40],'lat',[3080]);%m_coast;%m_range_ring(-123,49,[1e3:1e3:10e3],'color','r');%m_ungridrange_ring%m_range_ring(-123,49,[200:200:2000],'color','r');%------------------------------------------------自定义海岸线%Addingyourowncoastlinesmatla地图投影有关函数(2007-03-1122:52:34)转载function[output_args]=Untitled1(input_args)%UNTITLED1Summaryofthisfunctiongoeshere%Detailedexplanationgoeshere%---------------------海岸线%m_coast('patch',[.7.7.7],'edgecolor','none');%m_grid('xlabeldir','end','fontsize',10);%m_line(-129,48.5,'marker','square','markersize',4,'color','r');%m_text(-129,48.5,'M5','vertical','top');%---------------------------------------椭圆型投影%m_proj('mollweide');%m_coast('patch','r');%m_grid('xaxislocation','middle');%m_proj('stereographic');%Exampleforstereographicprojection(立体投影)%m_coast;%m_grid;loadcoast.datm_line(coast(:,1),coast(:,2));Filledcoastlineswillrequiremorework.Youshouldfirstreadtheinstructionsthereonjoiningthecoastlinedataintocontinuoussegments.Ifyouarelucky,(i.e.nolakesoranythingelse),youmayachievesuccesswithloadcoast.dat[X,Y]=m_ll2xy(coast(:,1),coast(:,2),'clip','patch');k=[find(isnan(X(:,1)))];fori=1:length(k)-1,x=coast([k(i)+1:(k(i+1)-1)k(i)+1],1);y=coast([k(i)+1:(k(i+1)-1)k(i)+1],2);patch(x,y,'r');end;%-----------------------------------------------toolboxcontents中各文件的描述Contents.m-toolboxcontentsm_demo.m-demonstratesafewmaps.User-callablefunctionsm_proj.m-initializesprojectionm_coord-geomagnstictogeographiccoordsm_grid.m-drawsgridsm_scale.m-forcesmaptoagivenscalem_ungrid.m-erasesmapelements(ifyouwanttochangeparameters)m_coast.m-drawsacoastlinem_elev.m-drawselevationdatam_tbase.m-drawselevationdatafromhigh-resolutiondatabasem_etopo2.m-drawselevationdatafrom(another)high-resolutiondatabasem_gshhs_c.m-drawscoastlinefromGSHHScrudedatabasem_gshhs_l.m-drawscoastlinefromGSHHSlow-resolutiondatabasem_gshhs_i.m-drawscoastlinefromGSHHSintermediate-resolutiondatabasem_gshhs_h.m-drawscoastlinefromGSHHShigh-resolutiondatabasem_gshhs_f.m-drawscoastlinefromGSHHSfullresolutiondatabasem_plotbndry.m-drawsapoliticalboundaryfromtheDCWm_usercoast.m-drawsacoastlineusingauser-specifiedsubsetdatabase.m_plot.m-drawslinedatainmapcoordsm_line.m-drawslinedatainmapcoordsm_text.m-addstextdatainmapcoordsm_legend.m-Drawalegendboxm_patch.m-addspatchdatainmapcoordsm_pcolor-drawspcolorsurfacem_quiver-drawsarrowsforvectordatam_contour-drawscontourlinesforgriddeddatam_contourf-drawsfilledcontoursm_track-drawsannotatedtracklinesm_range_ring-drawsrangeringsm_ll2xy.m-convertsfromlong/lattomapcoordinatesm_xy2ll.m-convertsfrommapcoordinatestolong/latm_geo2mag-convertsfrommagnetictogeographiccoordsm_mag2geo-thereversem_lldist-distancebetweenlong/latpointsm_xydist-distancebetweenmapcoordinatepointsm_fdist-locationofpointatgivenrange/bearingalongellipsoidalearthm_idist-range/bearingsbetweenpointsonellipsoidalearthm_geodesic-pointsongeodesicsbetweengivenpointsonellipsoidalearthm_tba2b.m-usedininstallinghigh-resolutionelevationdatabase.m_vec.m-fancyarrowsInternalfunctions(notmeanttobeuser-callable)private/mp_azim.m-azimuthalprojectionsprivate/mp_cyl.m-cylindricalprojections(equatorial)private/mp_conic.m-conicprojectionsprivate/mp_tmerc.m-transversecylindricalprojectionsprivate/mp_utm.m-ellipticaluniversaltransversecylindricalprojectionsprivate/mp_omerc.m-obliquecylindricalprojectionprivate/mu_util.m-variousutilityroutinesprivate/mu_coast.m-routinestohandlecoastlines.private/mc_coords-coordinateconversion.private/clabel.m-patchedversionofclabel(matlabv5.1versiondoesnotcontaincapabilitiesfordifferenttextproperties).private/m_coasts.mat-coastlinedataHTMLDocumentationmap.html-documentationintroprivate/mapug.html-usersguidevarious.gif-examples.