Mercurial > hg > octave-nkf
comparison scripts/signal/arma_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 | 38c61cbf086c |
comparison
equal
deleted
inserted
replaced
3456:434790acb067 | 3457:e031284eea27 |
---|---|
32 ## @var{x}(@var{i}) used for initialization, i.e., a sequence of length | 32 ## @var{x}(@var{i}) used for initialization, i.e., a sequence of length |
33 ## @var{t}+@var{n} is generated and @var{x}(@var{n}+1:@var{t}+@var{n}) | 33 ## @var{t}+@var{n} is generated and @var{x}(@var{n}+1:@var{t}+@var{n}) |
34 ## is returned. If @var{n} is omitted, @var{n} = 100 is used. | 34 ## is returned. If @var{n} is omitted, @var{n} = 100 is used. |
35 ## @end deftypefn | 35 ## @end deftypefn |
36 | 36 |
37 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at> | 37 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at> |
38 ## Description: Simulate an ARMA process | 38 ## Description: Simulate an ARMA process |
39 | 39 |
40 function x = arma_rnd (a, b, v, t, n) | 40 function x = arma_rnd (a, b, v, t, n) |
41 | 41 |
42 unwind_protect | 42 unwind_protect |
43 orig_listelemok = empty_list_elements_ok; | 43 orig_listelemok = empty_list_elements_ok; |
51 endif | 51 endif |
52 else | 52 else |
53 usage ("arma_rnd (a, b, v, t, n)"); | 53 usage ("arma_rnd (a, b, v, t, n)"); |
54 endif | 54 endif |
55 | 55 |
56 if ( (min (size (a)) > 1) || (min (size (b)) > 1) ) | 56 if ((min (size (a)) > 1) || (min (size (b)) > 1)) |
57 error ("arma_rnd: a and b must not be matrices"); | 57 error ("arma_rnd: a and b must not be matrices"); |
58 endif | 58 endif |
59 | 59 |
60 if (!is_scalar (t)) | 60 if (!is_scalar (t)) |
61 error ("arma_rnd: t must be a scalar"); | 61 error ("arma_rnd: t must be a scalar"); |
62 endif | 62 endif |
63 | 63 |
64 ar = length (a); | 64 ar = length (a); |
65 br = length (b); | 65 br = length (b); |
66 | 66 |