You are here

Routine plotapprox

Graphical comparison between tabulated data and an approximating function.

Description

This routine displays a graphical comparison between a set of samples $\left\{y_k\in\mathbb{R}^{n_1\times n_2}, k\in [1, N]\right\}$ obtained for different values $\left\{x_k\in\mathbb{R}^n,k \in [1, N]\right\}$ of some explanatory variables $x$, and an associated approximating function $f:\mathbb{R}^n\rightarrow\mathbb{R}^{n_1\times n_2}$. The local approximation error $f(x_k)-y_k$ is plotted for each entry and several indicators are computed to evaluate the accuracy of the approximation (see errapprox for a complete description).

Syntax

plotapprox(X,Y,names,fdata{,options})
plotapprox(X,Y,names,flfr{,options})

Input arguments

The first four input arguments are mandatory:

X Values $\left\{x_k\in\mathbb{R}^n,k \in [1, N]\right\}$ of the explanatory variables $x$ ($n\times N$ array, where X(:,k) corresponds to $x_k$). Note that $n$ can only be equal to 1 or 2 in this routine.
Y Samples $\left\{y_k\in\mathbb{R}^{n_1\times n_2}, k\in [1, N]\right\}$ ($n_1\times n_2\times N$ array where Y(:,:,k) corresponds to $y_k$ in the general case, or possibly $1\times N$ array where Y(k) corresponds to $y_k$ if $n_1=n_2=1$).
names Names of the explanatory variables $x$ ($1\times n$ cell array of strings).
fdata Values $\left\{f(x_k)\in\mathbb{R}^{n_1\times n_2},k \in [1, N]\right\}$ of the approximating function $f$ (same size as Y).
flfr Linear fractional representation of the approximating function $f$ (GSS object if the GSS library is installed, LFR object otherwise if the LFR toolbox is installed).

The fifth input argument options is an optional structured variable with field:

viewpoint This option is applicable only if 3-D graphs are to be displayed ($n=2$). It represents the deviation with respect to the default viewpoint. options.viewpoint(1) is the horizontal rotation in degrees about the z-axis, with positive values indicating counter-clockwise rotation. options.viewpoint(2) is the vertical elevation in degrees with positive values corresponding to moving above the graphs. The default value is options.viewpoint=[0 0].

See also

lsapprox
olsapprox
qpapprox
tracker
koala
errapprox