# mat2vec_E

Transforms the event function for a matrix-valued IVP into the event function for its corresponding vector-valued IVP.

## Syntax

Ev = mat2vec_E(Em,p)


## Description

Ev = mat2vec_E(Em,p) transforms the event function (where ) for a matrix-valued IVP into the event function (where ) for its corresponding vector-valued IVP.

## Input/Output Parameters

 Variable Symbol Description Format Input Em $\inline&space;E_{m}(t,\mathbf{M})$ event function for matrix-valued IVP ($\inline&space;E_{m}:\mathbb{R}\times\mathbb{R}^{p\times r}\rightarrow\mathbb{B}$) - inputs to Em are the current time (t, 1×1 double) and the current state matrix (M, p×r double) - output of Em is the evaluation of the event function (E, 1×1 logical) at the current time/state 1×1function_handle p $\inline&space;p$ number of rows of state matrix 1×1double Output Ev $\inline&space;E_{v}(t,\mathbf{y})$ event function for corresponding vector-valued IVP ($\inline&space;E_{v}:\mathbb{R}\times\mathbb{R}^{pr}\rightarrow\mathbb{B}$) - inputs to Ev are the current time (t, 1×1 double) and the current state vector (y, pr×1 double) - output of Ev is the evaluation of the event function (E, 1×1 logical) at the current time/state 1×1function_handle