# worldFileMatrixToRefmat

(Removed) Convert world file matrix to referencing matrix

`worldFileMatrixToRefmat` has been removed. Use the `georasterref` or `maprasterref` function instead. For more information, see Compatibility Considerations.

## Syntax

``refmat = worldFileMatrixToRefmat(W)``

## Description

````refmat = worldFileMatrixToRefmat(W)` converts the 2-by-3 world file matrix `W` to a 3-by-2 referencing matrix `refmat`.```

## Input Arguments

collapse all

World file matrix, specified as a 2-by-3 numeric array. A world file matrix defines a transformation that maps intrinsic coordinates to geographic or world coordinates.

## Output Arguments

collapse all

Referencing matrix, returned as a 3-by-2 numeric array. A referencing matrix defines a transformation that maps intrinsic coordinates to geographic or world coordinates.

• For world coordinates, the function returns `refmat` so that $\left[\begin{array}{cc}{x}_{w}& {y}_{w}\end{array}\right]=\left[\begin{array}{ccc}{x}_{i}& {y}_{i}& 1\end{array}\right]\cdot refmat$, where (xi, yi) is a location in intrinsic coordinates and (xw, yw) is the same location in world coordinates.

• For geographic coordinates, the function returns `refmat` so that $\left[\begin{array}{cc}lon& lat\end{array}\right]=\left[\begin{array}{ccc}x& y& 1\end{array}\right]\cdot refmat$, where x and y specify a location in intrinsic coordinates and lat and lon specify the same location in geographic coordinates.

## Version History

Introduced in R2011a

expand all

### R2023b: Removed

Some functions that return referencing matrices have been removed, including the `worldFileMatrixToRefmat` function. Instead of using this function, create a raster reference object using the `georasterref` or `maprasterref` function. Reference objects have several advantages over referencing matrices.

To update your code, change instances of the `worldFileMatrixToRefmat` function to the `georasterref` or `maprasterref` function and specify the size of the raster `A`. Use the `georasterref` function for geographic coordinates and the `maprasterref` function for planar map coordinates.

`R = georasterref(W,size(A));`

You can also specify the raster interpretation as `"cells"` for a raster of cells or `"postings"` for a raster of regularly posted samples. By default, the `georasterref` and `maprasterref` functions use `"cells"`.

`R = georasterref(W,size(A),"postings");`