%$Id: table.tex,v 25.95 2006/08/26 01:26:53 al Exp $ -*- LaTeX -*-
% man behavior table .
% Copyright (C) 2001 Albert Davis
% Author: Albert Davis <aldavis@ieee.org>
%
% This file is part of "Gnucap", the Gnu Circuit Analysis Package
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2, or (at your option)
% any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
% 02110-1301, USA.
%------------------------------------------------------------------------
\section{.model {\tt TABLE}: Fit a curve}
%------------------------------------------------------------------------
\subsection{Syntax}
\begin{verse}
{\tt .model} {\it name} {\tt TABLE} {\it x1,y1 x2,y2 ...} {\it args}
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

Fits a table of data using piecewise polynomials, or splines.
%------------------------------------------------------------------------
\subsection{Comments}

This function fits a set of piecewise polynomials to a set of data.

It differs from the {\tt FIT} function in that the {\tt TABLE} form
uses a {\tt .model} statement containing the actual data, while the
{\tt FIT} form has all of the data on the instance line.

See the comments section of {\tt FIT} for more detail on the options.
%------------------------------------------------------------------------
\subsection{Parameters}

\begin{description}
  
\item[{\tt Order} = {\it x}] The order of the polynomial to fit,
  within the supplied data.  (Default = 3) Legal values are 0, 1, 2,
  and 3, only.

\item[{\tt Below} = {\it x}] The value of the derivative to use
below or before the specified range.  

\item[{\tt Above} = {\it x}] The value of the derivative to use
above or after the specified range.

\end{description}
%------------------------------------------------------------------------
\subsection{Example} 

\begin{verbatim}
.model nlcap table -5,-5u 0,0 1,1u 4,2u 5,2u order=1
C1 (2 0) nlcap
\end{verbatim}

This ``capacitor'' stores 5 microcoulombs at -5 volts (negative,
corresponding to the negative voltage, as expected).  The charge
varies linearly to 0 at 0 volts, acting like a 1 microfarad capacitor.
(C = dq/dv).  This continues to 1 volt.  The 0,0 point could have been
left out.  The charge increases only to 2 microcoulombs at 4 volts,
for an incremental capacitance of 1u/3 or .3333 microfarads.  The same
charge at 5 volts indicates that it saturates at 2 microcoulombs.  For
negative voltages, the slope continues.  See the example under {\tt
  FIT} for a comparison.
%------------------------------------------------------------------------
%------------------------------------------------------------------------
