Mapping Toolbox    
resizem

Resize a matrix map

Syntax

Description

map = resizem(map0,m) resizes an original matrix map, map0 by a resizing factor m. For example, if m is 0.5, the number of rows and the number of columns will be cut in half. The result is the resized map, map.

map = resizem(map0,[r c]) resizes map0 so that the output map, map has r rows and c columns.

map = resizem(map0,m,method) specifies the method of interpolation. The string method 'nearest' results in nearest neighbor interpolation, the default. 'cubic' results in bicubic interpolation, and 'linear' results in bilinear interpolation.

[map,maplegend] = resizem(map0,m,maplegend0)resizes a regular matrix map with a map legend vector maplegend0 and returns a regular matrix map and its map legend vector, maplegend.

This case requires a resizing factor, m, rather than the [r c] vector, as map legends only have meaning for regular matrix maps (i.e., rows represent the same angular dimension as columns).

When the map size is being reduced, resizem lowpass filters the map before interpolating to avoid aliasing. By default, this filter is designed using FIR1, but can be specified using:

Unless a filter h is specified, resizem will not filter when 'nearest' is used. These filters are associated with the MATLAB Image Processing Toolbox.

Example

Double the size of a map:


  reducem restack