# pinv (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info Download Help (Windows Only)

Owning Class: linalgebra

Requires: MathScript RT Module

c = pinv(a)

c = pinv(a, tol)

## Description

Computes the pseudoinverse of a matrix. The m-by-n matrix A+ is the pseudoinverse of matrix A if A+ satisfies the following four Moore-Penrose conditions:
A A+ A = A
A+ A A+ = A+
A A+ is a symmetric matrix.
A+ A is a symmetric matrix.

Examples

## Inputs

Name Description
a Specifies a real rectangular or complex rectangular matrix.
tol Specifies the tolerance. The number of singular values greater than tol is the rank of a. tol is a real number. The default is -1.
If tol is negative, LabVIEW sets the tolerance using the following equation: tol = max(m, n)*||A||*eps, where A is the input matrix, m is the number of rows in A, n is the number of columns in A, ||A|| is the 2-norm of A, and eps is the smallest, floating-point number such that 1+eps>1. eps is defined by the following equation: eps = 2^(-52) = 2.22e-16.

## Outputs

Name Description
c Returns the pseudoinverse of a. c is a matrix.

## Details

The following table lists the support characteristics of this function.

 Supported in the LabVIEW Run-Time Engine Yes Supported on RT targets Yes Suitable for bounded execution times on RT Not characterized

## Examples

A = [1, 0, 1; 0, 0, 4]
C = pinv(A)