Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the perfect whitening method for MATLAB?

Shulou Source: shulou.com Published: 2022-06-01 06:43:30 10月03日 Update

This article mainly introduces "what is the method of perfect whitening of MATLAB". In daily operation, I believe that many people have doubts about the method of perfect whitening of MATLAB. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "what is the method of perfect whitening of MATLAB?" Next, please follow the editor to study!

The following is the code for this test, which only tests the whitening of lambert, mercator, and lat-lon projections, lambert and mercator projections are based on the m_map toolkit, and lat-lon is just a simple regular whitening.

Clear, clc

Z = peaks (1000); lon = [60150]; lat = [060]; [LON,LAT] = meshgrid (linspace (lon (1), lon (2), 1000), linspace (lat (1), lat (2), 1000))

Figurem_proj ('lambert',' longitudes', lon, 'latitudes', lat,' par', [30,60], 'clo', 105) m_contourf (LON, LAT, z); m_maskmap ('.. / data/chinamap/ Chinese administrative region _ contains coastal islands .shp', true, 'lon', lon,' lat', lat, 'masked mappings, true)

M_proj ('lambert',' longitudes', lon, 'latitudes', [15,60],' par', [30,60], 'clo', 105) m_grid (' box','on', 'linestyle',' none', 'tickdir',' out', 'linewidth', 3); m_mapshow ('.. / data/chinamap/cnmap/cnhimap.shp')

Figurem_proj ('mercator',' longitudes', lon, 'latitudes', lat) m_contourf (LON, LAT, z); m_maskmap ('.. / data/chinamap/ Administrative region of China _ contains coastal islands .shp', true, 'lon', lon,' lat', lat, 'massif mappings, true); m_mapshow ('.. / data/chinamap/cnmap/cnhimap.shp') m_grid ('box','on')

Figurec = contourf (LON, LAT, zjinestyle, 'none'); m_maskmap ('.. / data/chinamap/ Chinese administrative region _ contains coastal islands .shp', true, 'lon', lon,' lat', lat); mapshow ('.. / data/chinamap/cnmap/cnhimap.shp', 'color',' knight, 'displaytype',' line')

The following are the whitening test results of three projections, you can see, perfect whitening!

From left to right are the albino images projected by Lambert, Mercator and lat-lon, respectively.

There is a problem with this script when dealing with lambert projections with m_map, as shown in the following figure. There is no good way to solve this problem for the time being.

But in the above test script, a simple solution is given, that is, expand the range of the axis, and then whitening, after the whitening is completed, reset the projection, and finally set the m_grid type. This will solve the small problem above.

Small defects in whitening of lambert projection

Note:

1) this function only supports files whose shapefile file type is polygon. If it is line, it needs to be converted to polygon type.

2) when using lambert projection whitening, it should be noted that the par and clo parameters of the two projections should be the same.

At this point, the study of "what is the perfect whitening method of MATLAB" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Projection methods learning testing islands types administrative regions problems China files more scripts help practical consistent next three two items code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi vpn NVidia Microsoft macOS