# vec2mat_sol

Transforms the solution matrix for a vector-valued IVP into the solution array for its corresponding matrix-valued IVP.

## Syntax

M = vec2mat_sol(y,p)


## Description

M = vec2mat_sol(y,p) transforms the solution matrix, (y in MATLAB), for the vector-valued IVP into the solution array, (M in MATLAB) for the corresponding matrix-valued IVP. p specifies the number of rows of M.

## Input/Output Parameters

 Variable Symbol Description Format Input y $[\mathbf{y}]$ solution matrix (N+1)×prdouble p $\inline&space;p$ number of rows of state matrix 1×1double Output M $[\mathbf{M}]$ solution array p×r×(N+1)double

## Note

• The nth page of stores the state matrix (i.e. the solution) corresponding to the nth time in .