# SUBOPTIMALITY ANALYSIS

Find the maximum approximation error between a pwag and a pwas function

## Contents

Function of MOBY-DIC TOOLBOX.

## Description

Given a pwag function and a pwas function approximating it, this routine computes the maximum approximation error between the two functions and also the point in which this error is achieved. The computation of the maximum error M is performed in this way:

where and are obtained by solving:

subject to:

where are the gain matrices of the pwag function in region i ( i.e. in region i), and are the gain matrices of the pwas function in simplex j (which intersects region i). and denote region i, and denote simplex j.

## Syntax

[M x] = suboptimalityAnalysis(Upwas,U)

U is the pwag function, Upwas its pwas approximation. M is the maximum approximation error, x is the point in which the maximum error is obtained.

Contributors: