A wrapper function for makemov used to generate movement matrices for the operating model. Calculates a movement matrix from user-specified unfished stock biomass fraction in each area and probability of staying in the area in each time step.

## Arguments

- OM
Operating model, an object of class OM.

- dist
A vector of fractions of unfished stock in each area. The length of this vector will determine the number of areas (

`nareas`

) in the OM.- prob
Mean probability of staying across all areas (single value) or a vector of the probability of individuals staying in each area (same length as dist).

- distE
Logit (normal) St.Dev error for sampling stock fractions from the fracs vector

- probE
Logit (normal) St.Dev error for sampling desired probability of staying either by area (prob is same length as dist) or the mean probability of staying (prob is a single number).

- prob2
Optional vector as long as prob and dist. Upper bounds on uniform sampling of probability of staying, lower bound is prob.

- figure
Logical to indicate if the movement matrix will be plotted (mean values and range across

`OM@nsim`

simulations.)- mov
A four-dimensional array of dimension

`c(nsim, maxage, nareas, nareas)`

or a five-dimensional array of dimension`c(nsim, maxage, nareas, nareas, nyears + proyears)`

specifying movement in the operating model.- age
An age from 0 to maxage for the movement-at-age matrix figure when

`type = "matrix"`

.- type
Whether to plot a movement matrix for a single age (

`"matrix"`

) or the full movement versus age figure (`"all"`

)- year
If

`mov`

is a 5-dimensional array, the year (from 1 to nyears + proyears) for which to plot movement.- qval
The quantile to plot or report the range of values among simulations.

## Value

The operating model `OM`

with movement parameters in slot `cpars`

.
The `mov`

array is of dimension `nsim`

, `maxage`

, `nareas`

, `nareas`

.

## Functions

`simmov()`

: Estimation function for creating movement matrix.`plot_mov()`

: Plotting function.