# HG changeset patch # User jwe # Date 947843555 0 # Node ID 3234a698073ada6a56f4ddd25c34a5b96a786448 # Parent 2e06c3941943e9615b3decc7f1ac1a6897744095 [project @ 2000-01-14 09:51:14 by jwe] diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/Makefile.in --- a/doc/interpreter/Makefile.in Fri Jan 14 06:34:24 2000 +0000 +++ b/doc/interpreter/Makefile.in Fri Jan 14 09:52:35 2000 +0000 @@ -18,15 +18,15 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ -SUB_SOURCE := arith.txi audio.txi basics.txi bugs.txi control.txi \ - cp-idx.txi data.txi diffeq.txi emacs.txi errors.txi \ - eval.txi expr.txi fn-idx.txi func.txi gpl.txi \ - grammar.txi image.txi install.txi intro.txi io.txi \ - linalg.txi matrix.txi nonlin.txi numbers.txi \ - op-idx.txi optim.txi plot.txi poly.txi preface.txi \ - quad.txi set.txi signal.txi stats.txi stmt.txi \ - strings.txi struct.txi system.txi tips.txi var.txi \ - vr-idx.txi +SUB_SOURCE := arith.txi audio.txi basics.txi bugs.txi \ + container.txi control.txi cp-idx.txi data.txi diffeq.txi \ + emacs.txi errors.txi eval.txi expr.txi finance.txi \ + fn-idx.txi func.txi gpl.txi grammar.txi image.txi \ + install.txi intro.txi io.txi linalg.txi matrix.txi \ + nonlin.txi numbers.txi op-idx.txi optim.txi plot.txi \ + poly.txi preface.txi quad.txi set.txi signal.txi \ + stats.txi stmt.txi stream.txi strings.txi struct.txi \ + system.txi tips.txi var.txi vr-idx.txi SOURCES := $(SUB_SOURCE) diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/basics.txi --- a/doc/interpreter/basics.txi Fri Jan 14 06:34:24 2000 +0000 +++ b/doc/interpreter/basics.txi Fri Jan 14 09:52:35 2000 +0000 @@ -335,7 +335,7 @@ * Commands For Text:: * Commands For Completion:: * Commands For History:: -* Customizing @code{readline}:: +* Customizing readline:: * Customizing the Prompt:: * Diary and Echo Commands:: @end menu @@ -505,7 +505,7 @@ @DOCSTRING(completion_matches) -@node Commands For History, Customizing @code{readline}, Commands For Completion, Command Line Editing +@node Commands For History, Customizing readline, Commands For Completion, Command Line Editing @subsection Commands For Manipulating The History @cindex command history @cindex input history @@ -570,14 +570,14 @@ @DOCSTRING(saving_history) -@node Customizing @code{readline}, Customizing the Prompt, Commands For History, Command Line Editing +@node Customizing readline, Customizing the Prompt, Commands For History, Command Line Editing @subsection Customizing @code{readline} @c XXX FIXME XXX -- need a brief description of the ~/.inputrc file here. -@DOCSTRING{read_readline_init_file} +@DOCSTRING(read_readline_init_file) -@node Customizing the Prompt, Diary and Echo Commands, Customizing @code{readline}, Command Line Editing +@node Customizing the Prompt, Diary and Echo Commands, Customizing readline, Command Line Editing @subsection Customizing the Prompt @cindex prompt customization @cindex customizing the prompt diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/container.txi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/interpreter/container.txi Fri Jan 14 09:52:35 2000 +0000 @@ -0,0 +1,36 @@ +@c Copyright (C) 1996, 1997 John W. Eaton +@c This is part of the Octave manual. +@c For copying conditions, see the file gpl.texi. + +@node Containers, I/O Streams, Data Structures, Top +@chapter Containers +@cindex containers + +@menu +* Lists:: +* Cell Arrays:: +@end menu + +@node Lists, Cell Arrays, Containers, Containers +@section Lists +@cindex lists + +@DOCSTRING(list) + +@DOCSTRING(nth) + +@DOCSTRING(append) + +@DOCSTRING(reverse) + +@DOCSTRING(splice) + +@DOCSTRING(is_list) + +@node Cell Arrays, , Lists, Containers +@section Cell Arrays +@cindex cell arrays + +@DOCSTRING(cell) + +@DOCSTRING(iscell) diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/finance.txi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/interpreter/finance.txi Fri Jan 14 09:52:35 2000 +0000 @@ -0,0 +1,29 @@ +@c Copyright (C) 1996, 1997 John W. Eaton +@c This is part of the Octave manual. +@c For copying conditions, see the file gpl.texi. + +@node Financial Functions, Sets, Statistics, Top +@chapter Financial Functions +@cindex financial functions +@cindex money +@cindex compounding, value of + +@DOCSTRING(fv) + +@DOCSTRING(fvl) + +@DOCSTRING(irr) + +@DOCSTRING(nper) + +@DOCSTRING(npv) + +@DOCSTRING(pmt) + +@DOCSTRING(pv) + +@DOCSTRING(pvl) + +@DOCSTRING(rate) + +@DOCSTRING(vol) diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/octave.texi --- a/doc/interpreter/octave.texi Fri Jan 14 06:34:24 2000 +0000 +++ b/doc/interpreter/octave.texi Fri Jan 14 09:52:35 2000 +0000 @@ -121,6 +121,8 @@ * Numeric Data Types:: * Strings:: * Data Structures:: +* Containers:: +* I/O Streams:: * Variables:: * Expressions:: Expressions. * Evaluation:: @@ -137,6 +139,7 @@ * Differential Equations:: * Optimization:: * Statistics:: +* Financial Functions:: * Sets:: * Polynomial Manipulations:: * Control Theory:: @@ -207,6 +210,7 @@ * Commands For Text:: * Commands For Completion:: * Commands For History:: +* Customizing readline:: * Customizing the Prompt:: * Diary and Echo Commands:: @@ -226,6 +230,7 @@ * Matrices:: * Ranges:: +* Logical Values:: * Predicates for Numeric Objects:: Matrices @@ -239,6 +244,11 @@ * String Conversions:: * Character Class Functions:: +Containers + +* Lists:: +* Cell Arrays:: + Variables * Global Variables:: @@ -335,6 +345,8 @@ * Three-Dimensional Plotting:: * Plot Annotations:: * Multiple Plots on One Page:: +* Multiple Plot Windows:: +* Interaction with gnuplot:: Matrix Manipulation @@ -471,6 +483,8 @@ @include numbers.texi @include strings.texi @include struct.texi +@include container.texi +@include stream.texi @include var.texi @include expr.texi @include eval.texi @@ -487,6 +501,7 @@ @include diffeq.texi @include optim.texi @include stats.texi +@include finance.texi @include set.texi @include poly.texi @include control.texi diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/plot.txi --- a/doc/interpreter/plot.txi Fri Jan 14 06:34:24 2000 +0000 +++ b/doc/interpreter/plot.txi Fri Jan 14 09:52:35 2000 +0000 @@ -2,7 +2,7 @@ @c This is part of the Octave manual. @c For copying conditions, see the file gpl.texi. -@node Plotting +@node Plotting, Matrix Manipulation, Input and Output, Top @chapter Plotting All of Octave's plotting functions use @code{gnuplot} to handle the @@ -21,7 +21,7 @@ * Plot Annotations:: * Multiple Plots on One Page:: * Multiple Plot Windows:: -* Interaction with @code{gnuplot}:: +* Interaction with gnuplot:: @end menu @node Two-Dimensional Plotting, Specialized Two-Dimensional Plots, Plotting, Plotting @@ -329,12 +329,12 @@ @DOCSTRING(top_title) -@node Multiple Plot Windows, Interaction with @code{gnuplot}, Multiple Plots on One Page, Plotting +@node Multiple Plot Windows, Interaction with gnuplot, Multiple Plots on One Page, Plotting @section Multiple Plot Windows @DOCSTRING(figure) -@node Interaction with @code{gnuplot}, , Multiple Plot Windows, Plotting +@node Interaction with gnuplot, , Multiple Plot Windows, Plotting @section Interaction with @code{gnuplot} @DOCSTRING(gnuplot_binary) diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/set.txi --- a/doc/interpreter/set.txi Fri Jan 14 06:34:24 2000 +0000 +++ b/doc/interpreter/set.txi Fri Jan 14 09:52:35 2000 +0000 @@ -2,7 +2,7 @@ @c This is part of the Octave manual. @c For copying conditions, see the file gpl.texi. -@node Sets, Polynomial Manipulations, Statistics, Top +@node Sets, Polynomial Manipulations, Financial Functions, Top @chapter Sets Octave has a limited set of functions for managing sets of data, where a diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/stats.txi --- a/doc/interpreter/stats.txi Fri Jan 14 06:34:24 2000 +0000 +++ b/doc/interpreter/stats.txi Fri Jan 14 09:52:35 2000 +0000 @@ -2,7 +2,7 @@ @c This is part of the Octave manual. @c For copying conditions, see the file gpl.texi. -@node Statistics, Sets, Optimization, Top +@node Statistics, Financial Functions, Optimization, Top @chapter Statistics I hope that someday Octave will include more statistics functions. If diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/stream.txi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/interpreter/stream.txi Fri Jan 14 09:52:35 2000 +0000 @@ -0,0 +1,8 @@ +@c Copyright (C) 1996, 1997 John W. Eaton +@c This is part of the Octave manual. +@c For copying conditions, see the file gpl.texi. + +@node I/O Streams, Variables, Containers, Top +@chapter I/O Streams + +@DOCSTRING(is_stream) diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/struct.txi --- a/doc/interpreter/struct.txi Fri Jan 14 06:34:24 2000 +0000 +++ b/doc/interpreter/struct.txi Fri Jan 14 09:52:35 2000 +0000 @@ -2,7 +2,7 @@ @c This is part of the Octave manual. @c For copying conditions, see the file gpl.texi. -@node Data Structures, Variables, Strings, Top +@node Data Structures, Containers, Strings, Top @chapter Data Structures @cindex structures @cindex data structures diff -r 2e06c3941943 -r 3234a698073a doc/interpreter/var.txi --- a/doc/interpreter/var.txi Fri Jan 14 06:34:24 2000 +0000 +++ b/doc/interpreter/var.txi Fri Jan 14 09:52:35 2000 +0000 @@ -2,7 +2,7 @@ @c This is part of the Octave manual. @c For copying conditions, see the file gpl.texi. -@node Variables, Expressions, Data Structures, Top +@node Variables, Expressions, I/O Streams, Top @chapter Variables @cindex variables, user-defined @cindex user-defined variables diff -r 2e06c3941943 -r 3234a698073a scripts/control/base/dre.m --- a/scripts/control/base/dre.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/base/dre.m Fri Jan 14 09:52:35 2000 +0000 @@ -17,26 +17,45 @@ ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. ## -*- texinfo -*- -## @deftypefn {Function File} {[@var{tvals},@var{Plist}] =} dre(@var{sys},@var{Q},@var{R},@var{Qf},@var{t0},@var{tf}[,@var{Ptol},@var{maxits}]); +## @deftypefn {Function File} {[@var{tvals},@var{Plist}] =} dre (@var{sys},@var{Q},@var{R},@var{Qf},@var{t0},@var{tf}[,@var{Ptol},@var{maxits}]); ## Solve the differential Riccati equation ## @ifinfo ## @example ## -d P/dt = A'P + P A - P B inv(R) B' P + Q ## P(tf) = Qf -## @example +## @end example ## @end ifinfo ## @iftex ## @tex -## \(-\frac{dP}{dt} = A^{T}P+PA-PBR^{-1}B^{T}P+Q\) +## $$ -{dP \over dt} = A^T P+PA-PBR^{-1}B^T P+Q $$ +## $$ P(t_f) = Qf $$ ## @end tex ## @end iftex ## for the LTI system sys. Solution of standard LTI ## state feedback optimization -## min \int_{t_0}^{t_f} x' Q x + u' R u dt + x(t_f)' Qf x(t_f) +## @ifinfo +## @example +## min \int_@{t_0@}^@{t_f@} x' Q x + u' R u dt + x(t_f)' Qf x(t_f) +## @end example +## @end ifinfo +## @iftex +## @tex +## $$ \min \int_{t_0}^{t_f} x^T Q x + u^T R u dt + x(t_f)^T Qf x(t_f) $$ +## @end tex +## @end iftex ## optimal input is +## @ifinfo +## @example ## u = - inv(R) B' P(t) x +## @end example +## @end ifinfo +## @iftex +## @tex +## $$ u = - R^{-1} B^T P(t) x $$ +## @end tex +## @end iftex ## @strong{Inputs} -## @table +## @table @var ## @item sys ## continuous time system data structure ## @item Q @@ -54,7 +73,7 @@ ## number of refinement iterations (default=10) ## @end table ## @strong{Outputs} -## @table +## @table @var ## @item tvals ## time values at which @var{P}(@var{t}) is computed ## @item Plist diff -r 2e06c3941943 -r 3234a698073a scripts/control/hinf/hinfsyn_ric.m --- a/scripts/control/hinf/hinfsyn_ric.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/hinf/hinfsyn_ric.m Fri Jan 14 09:52:35 2000 +0000 @@ -18,22 +18,29 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{Xinf},@var{x_ha_err}] =} hinfsyn_ric(@var{A},@var{BB}.@var{C1},@var{d1dot},@var{R},@var{ptol}) -## @table -## @item forms -## xx = ([BB; -C1'*d1dot]/R) * [d1dot'*C1 BB']; -## Ha = [A 0*A; -C1'*C1 -A'] - xx; -## @end table -## and solves associated Riccati equation -## returns error code -## @table -## @item x_ha_err -## 0: successful -## 1: Xinf has imaginary eigenvalues -## 2: Hx not Hamiltonian -## 3: Xinf has inf. eigenvalues (numerical overflow) -## 4: Xinf not symmetric -## 5: Xinf not positive definite -## 6: R is singular +## Forms +## @example +## xx = ([BB; -C1'*d1dot]/R) * [d1dot'*C1 BB']; +## Ha = [A 0*A; -C1'*C1 -A'] - xx; +## @end example +## and solves associated Riccati equation. +## The error code @var{x_ha_err} indicates one of the following +## conditions: +## @table @asis +## @item 0 +## successful +## @item 1 +## Xinf has imaginary eigenvalues +## @item 2 +## Hx not Hamiltonian +## @item 3 +## Xinf has inf. eigenvalues (numerical overflow) +## @item 4 +## Xinf not symmetric +## @item 5 +## Xinf not positive definite +## @item 6 +## R is singular ## @end table ## @end deftypefn diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/__tf2sysl__.m --- a/scripts/control/system/__tf2sysl__.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/__tf2sysl__.m Fri Jan 14 09:52:35 2000 +0000 @@ -18,7 +18,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {@var{vec} =} __tf2sysl__ (@var{vec}) -## used internally in @ref{tf2sys}. +## used internally in tf2sys. ## strip leading zero coefficients to get the true polynomial length ## @end deftypefn diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/ord2.m --- a/scripts/control/system/ord2.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/ord2.m Fri Jan 14 09:52:35 2000 +0000 @@ -21,9 +21,12 @@ ## Creates a continuous 2nd order system with parameters: ## @strong{Inputs} ## @table @var -## @item nfreq: natural frequency [Hz]. (not in rad/s) -## @item damp: damping coefficient -## @item gain: dc-gain +## @item nfreq +## natural frequency [Hz]. (not in rad/s) +## @item damp +## damping coefficient +## @item gain +## dc-gain ## This is steady state value only for damp > 0. ## gain is assumed to be 1.0 if ommitted. ## @end table diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/parallel.m --- a/scripts/control/system/parallel.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/parallel.m Fri Jan 14 09:52:35 2000 +0000 @@ -16,7 +16,8 @@ ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. -## function sysp = parallel(Asys,Bsys) +## -*- texinfo -*- +## @deftypefn {Function File} {@var{sysp} =} parallel (@var{Asys}, @var{Bsys}) ## Forms the parallel connection of two systems. ## ## ____________________ @@ -28,6 +29,7 @@ ## | -------- | ## -------------------- ## Ksys +## @end deftypefn ## Author: David Clem ## Created: August 15, 1994 diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/sys2fir.m --- a/scripts/control/system/sys2fir.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/sys2fir.m Fri Jan 14 09:52:35 2000 +0000 @@ -19,7 +19,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{c}, @var{tsam}, @var{input}, @var{output}] =} sys2fir (@var{sys}) ## -## Extract FIR data from system data structure; see @ref{fir2sys} for +## Extract FIR data from system data structure; see fir2sys for ## parameter descriptions. ## @end deftypefn ## @seealso{fir2sys} diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/sys2ss.m --- a/scripts/control/system/sys2ss.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/sys2ss.m Fri Jan 14 09:52:35 2000 +0000 @@ -21,7 +21,7 @@ ## Extract state space representation from system data structure. ## ## @strong{Inputs} -## @var{sys} system data structure (@pxref{sysstruct}) +## @var{sys} system data structure ## ## @strong{Outputs} ## @table @var diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/sys2tf.m --- a/scripts/control/system/sys2tf.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/sys2tf.m Fri Jan 14 09:52:35 2000 +0000 @@ -20,7 +20,7 @@ ## @deftypefn {Function File} {[@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname}] =} sys2tf (@var{sys}) ## Extract transfer function data from a system data structure ## -## See @ref{tf2sys} for parameter descriptions. +## See tf2sys for parameter descriptions. ## ## @strong{Example} ## @example diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/sys2zp.m --- a/scripts/control/system/sys2zp.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/sys2zp.m Fri Jan 14 09:52:35 2000 +0000 @@ -21,7 +21,7 @@ ## Extract zero/pole/leading coefficient information from a system data ## structure ## -## See @ref{zp2sys} for parameter descriptions. +## See zp2sys for parameter descriptions. ## ## @strong{Example} ## @example diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/sysdup.m --- a/scripts/control/system/sysdup.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/sysdup.m Fri Jan 14 09:52:35 2000 +0000 @@ -23,7 +23,7 @@ ## @strong{Inputs} ## @table @var ## @item Asys -## system data structure (@pxref{ss2sys}) +## system data structure ## @item out_idx ## @itemx in_idx ## list of connections indices; diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/sysgetsignals.m --- a/scripts/control/system/sysgetsignals.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/sysgetsignals.m Fri Jan 14 09:52:35 2000 +0000 @@ -83,7 +83,7 @@ ## stage signals ## @item sigid="yd" ## @var{siglist} is set to logical vector indicating discrete outputs; -## @var{siglist(ii) = 0} indicates that output @var{ii} is continuous +## @var{siglist}(@var{ii}) = 0 indicates that output @var{ii} is continuous ## (unsampled), otherwise it is discrete. ## ## @end table diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/sysmin.m --- a/scripts/control/system/sysmin.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/sysmin.m Fri Jan 14 09:52:35 2000 +0000 @@ -16,7 +16,8 @@ ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. -## [retsys,nc,no] = sysmin(sys{,flg}); +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{retsys}, @var{nc}, @var{no}] =} sysmin (@var{sys}, @var{flg}) ## return a minimal (or reduced order) system ## inputs: ## sys: system data structure @@ -31,10 +32,11 @@ ## no: number of observable states in the returned system ## cflg: is_controllable(retsys) ## oflg: is_observable(retsys) +## @end deftypefn ## Author: A. S. Hodel -function [retsys, nc, no, cflg, oflg] = sysmin (sys, flg); +function [retsys, nc, no, cflg, oflg] = sysmin (sys, flg) switch(nargin) case(1), flg = 0; diff -r 2e06c3941943 -r 3234a698073a scripts/control/system/sysout.m --- a/scripts/control/system/sysout.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/control/system/sysout.m Fri Jan 14 09:52:35 2000 +0000 @@ -26,7 +26,7 @@ ## Display option ## @table @code ## @item [] -## primary system form (default); see @ref{sysgettype}. +## primary system form (default) ## @item "ss" ## state space form ## @item "tf" diff -r 2e06c3941943 -r 3234a698073a scripts/finance/fv.m --- a/scripts/finance/fv.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/fv.m Fri Jan 14 09:52:35 2000 +0000 @@ -14,19 +14,22 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: fv (r, n, p [, l] [, method]) -## -## Returns the future value at the end of period n of an investment -## which consisting of n payments of p in each period, assuming an -## interest rate r. +## -*- texinfo -*- +## @deftypefn {Function File} {} fv (@var{r}, @var{n}, @var{p}, @var{l}, @var{method}) +## Return the future value at the end of period @var{n} of an investment +## which consists of @var{n} payments of @var{p} in each period, +## assuming an interest rate @var{r}. ## -## With the optional scalar argument l, one can specify an additional -## lump-sum payment. With the optional argument `method', one can -## specify whether the payments are made at the end ("e", default) or at -## the beginning ("b") of each period. +## The optional argument @var{l} may be used to specify an +## additional lump-sum payment. ## -## Note that the rate r is not specified in percent, i.e., one has to -## write 0.05 rather than 5 %. +## The optional argument @var{method} may be used ot specify whether the +## payments are made at the end (@code{"e"}, default) or at the +## beginning (@code{"b"}) of each period. +## +## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, +## not 5 percent). +## @end deftypefn ## Author: KH ## Description: Future value of an investment diff -r 2e06c3941943 -r 3234a698073a scripts/finance/fvl.m --- a/scripts/finance/fvl.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/fvl.m Fri Jan 14 09:52:35 2000 +0000 @@ -14,10 +14,15 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: fvl (r, n, l) +## -*- texinfo -*- +## @deftypefn {Function File} {} fvl (@var{r}, @var{n}, @var{l}) +## Return the future value at the end of @var{n} periods of an initial +## lump sum investment @var{l}, given a per-period interest rate +## @var{r}. ## -## Returns the future value at the end of n periods of an initial lump -## sum investment l, given a per-period interest rate r. +## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, +## not 5 percent). +## @end deftypefn ## Author: KH ## Description: Future value of an initial lump sum investment diff -r 2e06c3941943 -r 3234a698073a scripts/finance/irr.m --- a/scripts/finance/irr.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/irr.m Fri Jan 14 09:52:35 2000 +0000 @@ -14,13 +14,14 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: irr (p [, i]) -## -## Computes the internal rate of return of a series of payments p from -## an initial investment i, i.e., the solution of npv (r, p) = i. If the -## second argument is omitted, i = 0 is used. -## -## See also: npv; pv, rate. +## -*- texinfo -*- +## @deftypefn {Function File} {} irr (@var{p}, @var{i}) +## Return the internal rate of return of a series of payments @var{p} +## from an initial investment @var{i} (i.e., the solution of +## @code{npv (r, p) = i}. If the second argument is omitted, a value of +## 0 is used. +## @end deftypefn +## @seealso{npv, pv, and rate} ## Author: KH ## Description: Internal rate of return of an investment diff -r 2e06c3941943 -r 3234a698073a scripts/finance/nper.m --- a/scripts/finance/nper.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/nper.m Fri Jan 14 09:52:35 2000 +0000 @@ -15,19 +15,19 @@ ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {} nper (@var{r}, @var{p}, @var{a} [, @var{l}] [, @var{method}]) +## @deftypefn {Function File} {} nper (@var{r}, @var{p}, @var{a}, @var{l}, @var{method}) +## Return the number of regular payments of @var{p} necessary to +## amortize @var{a} loan of amount @var{a} and interest @var{r}. ## -## Computes the number of regular payments of @var{p} necessary to amortize @var{a} -## loan of amount @var{a} and interest @var{r}. +## The optional argument @var{l} may be used to specify an additional +## lump-sum payment of @var{l} made at the end of the amortization time. ## -## With the optional scalar argument @var{l}, one can specify an additional -## lump-sum payment of @var{l} made at the end of the amortization time. With -## the optional string argument `method', one can specify whether -## payments are made at the end ("e", default) or at the beginning ("b") -## of each period. +## The optional argument @var{method} may be used to specify whether +## payments are made at the end (@var{"e"}, default) or at the beginning +## (@var{"b"}) of each period. ## -## Note that the rate r is not specified in percent, i.e., one has to -## write 0.05 rather than 5 %. +## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, +## not 5 percent). ## @end deftypefn ## @seealso{pv, pmt, rate, and npv} diff -r 2e06c3941943 -r 3234a698073a scripts/finance/npv.m --- a/scripts/finance/npv.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/npv.m Fri Jan 14 09:52:35 2000 +0000 @@ -15,18 +15,18 @@ ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {} npv (@var{r}, @var{p} [, @var{i}]) +## @deftypefn {Function File} {} npv (@var{r}, @var{p}, @var{i}) ## Returns the net present value of a series of irregular (i.e., not ## necessarily identical) payments @var{p} which occur at the ends of @var{n} ## consecutive periods. @var{r} specifies the one-period interest rates and ## can either be a scalar (constant rates) or a vector of the same ## length as @var{p}. ## -## With the optional scalar argument @var{i}, one can specify an initial +## The optional argument @var{i} may be used to specify an initial ## investment. ## -## Note that rates are not specified in percent, i.e., one has to write -## 0.05 rather than 5 %. +## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, +## not 5 percent). ## @end deftypefn ## @seealso{irr and pv} diff -r 2e06c3941943 -r 3234a698073a scripts/finance/pmt.m --- a/scripts/finance/pmt.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/pmt.m Fri Jan 14 09:52:35 2000 +0000 @@ -15,14 +15,16 @@ ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {} pmt (@var{r}, @var{n}, @var{a} [, @var{l}] [, @var{method}]) -## Compute the amount of periodic payment necessary to amortize a loan +## @deftypefn {Function File} {} pmt (@var{r}, @var{n}, @var{a}, @var{l}, @var{method}) +## Return the amount of periodic payment necessary to amortize a loan ## of amount a with interest rate @var{r} in @var{n} periods. ## -## With the optional scalar argument l, one can specify an initial -## lump-sum payment. With the optional string argument `method', one can -## specify whether payments are made at the end ("e", default) or at the -## beginning ("b") of each period. +## The optional argument @var{l} may be used to specify an initial +## lump-sum payment. +## +## The optional argument @var{method} may be used to specify whether +## payments are made at the end (@var{"e"}, default) or at the beginning +## (@var{"b"}) of each period. ## @end deftypefn ## @seealso{pv, nper, and rate} diff -r 2e06c3941943 -r 3234a698073a scripts/finance/pv.m --- a/scripts/finance/pv.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/pv.m Fri Jan 14 09:52:35 2000 +0000 @@ -15,19 +15,19 @@ ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {} pv (@var{r}, @var{n}, @var{p} [, @var{l}] [, @var{method}]) +## @deftypefn {Function File} {} pv (@var{r}, @var{n}, @var{p}, @var{l}, @var{method}) ## Returns the present value of an investment that will pay off @var{p} for @var{n} ## consecutive periods, assuming an interest @var{r}. ## -## With the optional scalar argument @var{l}, one can specify an additional +## The optional argument @var{l} may be used to specify an additional ## lump-sum payment made at the end of @var{n} periods. ## -## With the optional string argument `method', one can specify whether -## payments are made at the end ("e", default) or at the beginning ("b") -## of each period. +## The optional argument @var{method} may be used to specify whether +## payments are made at the end (@code{"e"}, default) or at the +## beginning (@code{"b"}) of each period. ## -## Note that the rate r is not specified in percent, i.e., one has to -## write 0.05 rather than 5 %. +## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, +## not 5 percent). ## @end deftypefn ## @seealso{pmt, nper, rate, and npv} diff -r 2e06c3941943 -r 3234a698073a scripts/finance/pvl.m --- a/scripts/finance/pvl.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/pvl.m Fri Jan 14 09:52:35 2000 +0000 @@ -14,10 +14,15 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: pvl (r, n, p) +## -*- texinfo -*- +## @deftypefn {Function File} {} pvl (@var{r}, @var{n}, @var{p}) +## Return the present value of an investment that will pay off @var{p} +## in one lump sum at the end of @var{n} periods, given the interest +## rate @var{r}. ## -## Returns the present value of an investment that will pay off p in one -## lump sum at the end of n periods, given the interest rate r. +## Note that the rate @var{r} is specified as a fraction (i.e., 0.05, +## not 5 percent). +## @end deftypefn ## Author: KH ## Description: Present value of an investment that pays off at the end diff -r 2e06c3941943 -r 3234a698073a scripts/finance/rate.m --- a/scripts/finance/rate.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/rate.m Fri Jan 14 09:52:35 2000 +0000 @@ -15,14 +15,16 @@ ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {} rate (@var{n}, @var{p}, @var{v} [, @var{l}] [,@var{method}]) -## Computes the rate of return on an investment of present value @var{v} which +## @deftypefn {Function File} {} rate (@var{n}, @var{p}, @var{v}, @var{l}, @var{method}) +## Return the rate of return on an investment of present value @var{v} which ## pays @var{p} in @var{n} consecutive periods. ## -## With the optional scalar argument @var{l}, one can specify an additional -## lump-sum payment made at the end of @var{n} periods. With the optional -## string argument @var{`method'}, one can specify whether payments are made -## at the end ("e", default) or at the beginning ("b") of each period. +## The optional argument @var{l} may be used to specify an additional +## lump-sum payment made at the end of @var{n} periods. +## +## The optional string argument @var{method} may be used to specify +## whether payments are made at the end (@code{"e"}, default) or at the +## beginning (@code{"b"}) of each period. ## @end deftypefn ## @seealso{pv, pmt, nper, and npv} diff -r 2e06c3941943 -r 3234a698073a scripts/finance/vol.m --- a/scripts/finance/vol.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/finance/vol.m Fri Jan 14 09:52:35 2000 +0000 @@ -14,14 +14,16 @@ ## along with this file. If not, write to the Free Software Foundation, ## 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## usage: vol (X, m [, n]) -## -## vol returns the volatility of each column of the input matrix X. m is -## the number of data sets per period (e.g. the number of data per year -## if you want to compute the volatility per year). The optional -## parameter n gives the number of past periods used for computation, if -## n is omitted, n=1 is used. If T is the number of rows of X, vol -## returns the volatility from n*m to T. +## -*- texinfo -*- +## @deftypefn {Function File} {} vol (@var{x}, @var{m}, @var{n}) +## Return the volatility of each column of the input matrix @var{x}. +## The number of data sets per period is given by @var{m} (e.g. the +## number of data per year if you want to compute the volatility per +## year). The optional parameter @var{n} gives the number of past +## periods used for computation, if it is omitted, a value of 1 is used. +## If @var{t} is the number of rows of @var{x}, @code{vol} returns the +## volatility from @code{n*m} to @var{t}. +## @end deftypefn ## Author: FL ## Description: Volatility of financial time series data diff -r 2e06c3941943 -r 3234a698073a scripts/linear-algebra/housh.m --- a/scripts/linear-algebra/housh.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/linear-algebra/housh.m Fri Jan 14 09:52:35 2000 +0000 @@ -16,8 +16,9 @@ ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. -## function [housv,beta,zer] = housh(x,j,z) -## computes householder reflection vector housv to reflect x to be +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{housv}, @var{beta}, @var{zer}] =} housh (@var{x}, @var{j}, @var{z}) +## Computes householder reflection vector housv to reflect x to be ## jth column of identity, i.e., (I - beta*housv*housv')x =e(j) ## inputs ## x: vector @@ -26,11 +27,10 @@ ## outputs: (see Golub and Van Loan) ## beta: If beta = 0, then no reflection need be applied (zer set to 0) ## housv: householder vector -## mar 6,1987 : rev dec 17,1988 -## rev sep 19,1991 (blas) -## translated from FORTRAN Aug 1995 +## @end deftypefn ## Author: A. S. Hodel +## Created: August 1995 function [housv, beta, zer] = housh (x, j, z) diff -r 2e06c3941943 -r 3234a698073a scripts/linear-algebra/krylov.m --- a/scripts/linear-algebra/krylov.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/linear-algebra/krylov.m Fri Jan 14 09:52:35 2000 +0000 @@ -16,7 +16,8 @@ ## along with Octave; see the file COPYING. If not, write to the Free ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. -## function [U,H,nu] = krylov(A,V,k{,eps1,pflg}); +## -*- texinfo -*- +## @deftypefn {Function File} {[@var{U}, @var{H}, @var{nu}] =} krylov (@var{A}, @var{V}, @var{k}, @var{eps1}, @var{pflg}); ## construct orthogonal basis U of block Krylov subspace; ## [V AV A^2*V ... A^(k+1)*V]; ## method used: householder reflections to guard against loss of @@ -38,7 +39,9 @@ ## Reference: Hodel and Misra, "Partial Pivoting in the Computation of ## Krylov Subspaces", to be submitted to Linear Algebra and its ## Applications -## written by A. Scottedward Hodel a.s.hodel@eng.auburn.edu +## @end deftypefn + +## Author: A. Scottedward Hodel function [Uret,H,nu] = krylov(A,V,k,eps1,pflg); diff -r 2e06c3941943 -r 3234a698073a scripts/plot/meshgrid.m --- a/scripts/plot/meshgrid.m Fri Jan 14 06:34:24 2000 +0000 +++ b/scripts/plot/meshgrid.m Fri Jan 14 09:52:35 2000 +0000 @@ -19,7 +19,7 @@ ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x}, @var{y}) -## @deftypefnx {Function File {[@var{xx}, @var{yy}] =} meshgrid (@var{x}) +## @deftypefnx {Function File} {[@var{xx}, @var{yy}] =} meshgrid (@var{x}) ## Given vectors of @var{x} and @var{y} coordinates, return two matrices corresponding ## to the @var{x} and @var{y} coordinates of a mesh. The rows of @var{xx} are copies of @var{x}, ## and the columns of @var{yy} are copies of @var{y}. diff -r 2e06c3941943 -r 3234a698073a src/data.cc --- a/src/data.cc Fri Jan 14 06:34:24 2000 +0000 +++ b/src/data.cc Fri Jan 14 09:52:35 2000 +0000 @@ -165,7 +165,7 @@ @deftypefn {Mapping Function} {} atan2 (@var{y}, @var{x})\n\ Compute atan (@var{y} / @var{x}) for corresponding elements of @var{y}\n\ and @var{x}. The result is in range -pi to pi.\n\ -@deftypefn") +@end deftypefn") { octave_value_list retval; @@ -794,7 +794,7 @@ "-*- texinfo -*-\n\ @deftypefn {Built-in Functio} {} is_bool (@var{x})\n\ Return true if @var{x} is a boolean object.\n\ -@deftypefn") +@end deftypefn") { octave_value retval;