Mercurial > hg > octave-shane
changeset 6497:fc8ed0c77e08
[project @ 2007-04-05 17:30:31 by jwe]
author | jwe |
---|---|
date | Thu, 05 Apr 2007 17:30:31 +0000 |
parents | e0acfe7c3f7b |
children | 2c85044aa63f |
files | scripts/finance/fv.m scripts/finance/fvl.m scripts/finance/nper.m scripts/finance/npv.m scripts/finance/pv.m scripts/finance/pvl.m scripts/finance/rate.m |
diffstat | 7 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/finance/fv.m +++ b/scripts/finance/fv.m @@ -39,13 +39,13 @@ function v = fv (r, n, p, l, m) - if ((nargin < 3) || (nargin > 5)) + if (nargin < 3 || nargin > 5) print_usage (); endif - if (! (isscalar (r) && (r > -1))) + if (! (isscalar (r) && r > -1)) error ("fv: r must be a scalar > -1"); - elseif (! (isscalar (n) && (n > 0))) + elseif (! (isscalar (n) && n > 0)) error ("fv: n must be a positive scalar"); elseif (! isscalar (p)) error ("fv: p must be a scalar");
--- a/scripts/finance/fvl.m +++ b/scripts/finance/fvl.m @@ -36,9 +36,9 @@ print_usage (); endif - if (! (isscalar (r) && (r > -1))) + if (! (isscalar (r) && r > -1)) error ("fvl: r has to be a scalar > -1"); - elseif (! (isscalar (n) && (n > 0))) + elseif (! (isscalar (n) && n > 0)) error ("fvl: n has to be a positive scalar"); elseif (! isscalar (l)) error ("fvl: l has to be a scalar");
--- a/scripts/finance/nper.m +++ b/scripts/finance/nper.m @@ -39,11 +39,11 @@ function n = nper (r, p, a, l, m) - if ((nargin < 3) || (nargin > 5)) + if (nargin < 3 || nargin > 5) print_usage (); endif - if (! (isscalar (r) && (r > -1))) + if (! (isscalar (r) && r > -1)) error ("nper: r must be a scalar > -1"); elseif (! isscalar (p)) error ("nper: p must be a scalar");
--- a/scripts/finance/npv.m +++ b/scripts/finance/npv.m @@ -38,7 +38,7 @@ function v = npv (r, p, i) - if ((nargin < 2) || (nargin > 3)) + if (nargin < 2 || nargin > 3) print_usage (); endif
--- a/scripts/finance/pv.m +++ b/scripts/finance/pv.m @@ -39,13 +39,13 @@ function v = pv (r, n, p, l, m) - if ((nargin < 3) || (nargin > 5)) + if (nargin < 3 || nargin > 5) print_usage (); endif - if (! (isscalar (r) && (r > -1))) + if (! (isscalar (r) && r > -1)) error ("pv: r must be a scalar > -1"); - elseif (! (isscalar (n) && (n > 0))) + elseif (! (isscalar (n) && n > 0)) error ("pv: n must be a positive scalar"); elseif (! isscalar (p)) error ("pv: p must be a scalar");
--- a/scripts/finance/pvl.m +++ b/scripts/finance/pvl.m @@ -38,7 +38,7 @@ if (! (isscalar (r) && (r > -1))) error ("pvl: r has to be a scalar > -1"); - elseif (! (isscalar (n) && (n > 0))) + elseif (! (isscalar (n) && n > 0)) error ("pvl: n has to be a positive scalar"); elseif (! isscalar (p)) error ("pvl: p has to be a scalar");
--- a/scripts/finance/rate.m +++ b/scripts/finance/rate.m @@ -36,11 +36,11 @@ function r = rate (n, p, v, l, m) - if ((nargin < 3) || (nargin > 5)) + if (nargin < 3 || nargin > 5) print_usage (); endif - if (! (isscalar (n) && (n > 0))) + if (! (isscalar (n) && n > 0)) error ("rate: n must be a positive scalar"); elseif (! isscalar (p)) error ("rate: p must be a scalar");