firstValueRow: Returning the first >0 value in each row of a matrix

Description Usage Arguments Value Author(s) See Also Examples

View source: R/firstValueRow.R

Description

Technical function implemented in the pricing functions of the package. It returns the first >0 value in each row of a matrix and assign zero to all subsequent values.

Usage

1

Arguments

x

A matrix.

Value

A matrix.

Author(s)

Mikhail A. Beketov

See Also

Functions: AmerPutLSM, AmerPutLSM_AV, AmerPutLSM_CV, AsianAmerPutLSM, QuantoAmerPutLSM, and QuantoAmerPutLSM_AV.

Examples

1
2
3
mat<-matrix(c(0,0,2,0,4,0,3,0,1,9,8,7), ncol=4)
mat
firstValueRow(mat)

LSMonteCarlo documentation built on May 2, 2019, 8:55 a.m.