Mercurial > hg > octave-lyh
diff scripts/signal/arch_rnd.m @ 3457:e031284eea27
[project @ 2000-01-19 08:49:56 by jwe]
author | jwe |
---|---|
date | Wed, 19 Jan 2000 08:50:14 +0000 |
parents | 858695b3ed62 |
children | 3e3e14ad5149 |
line wrap: on
line diff
--- a/scripts/signal/arch_rnd.m +++ b/scripts/signal/arch_rnd.m @@ -33,8 +33,8 @@ ## @end example ## @end deftypefn -## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> -## Description: Simulate an ARCH process +## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> +## Description: Simulate an ARCH process function y = arch_rnd (a, b, T) @@ -42,15 +42,15 @@ usage ("arch_rnd (a, b, T)"); endif - if !( (min (size (a)) == 1) && (min (size (b)) == 1) ) - error ("arch_rnd: a and b must both be scalars or vectors"); + if (! ((min (size (a)) == 1) && (min (size (b)) == 1))) + error ("arch_rnd: a and b must both be scalars or vectors"); endif - if !( is_scalar (T) && (T > 0) && (rem (T, 1) == 0) ) - error ("arch_rnd: T must be a positive integer"); + if (! (is_scalar (T) && (T > 0) && (rem (T, 1) == 0))) + error ("arch_rnd: T must be a positive integer"); endif - if !(a(1) > 0) - error ("arch_rnd: a(1) must be positive"); + if (! (a(1) > 0)) + error ("arch_rnd: a(1) must be positive"); endif ## perhaps add a test for the roots of a(z) here ...