Mercurial > hg > octave-lyh
comparison scripts/signal/arma_rnd.m @ 4460:cef48c4b902d
[project @ 2003-07-11 18:37:48 by jwe]
author | jwe |
---|---|
date | Fri, 11 Jul 2003 18:37:48 +0000 |
parents | 22bd65326ec1 |
children | 4c8a2e4e0717 |
comparison
equal
deleted
inserted
replaced
4459:75ee1995d2b4 | 4460:cef48c4b902d |
---|---|
40 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at> | 40 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at> |
41 ## Description: Simulate an ARMA process | 41 ## Description: Simulate an ARMA process |
42 | 42 |
43 function x = arma_rnd (a, b, v, t, n) | 43 function x = arma_rnd (a, b, v, t, n) |
44 | 44 |
45 save_warn_empty_list_elements = warn_empty_list_elements; | |
45 unwind_protect | 46 unwind_protect |
46 orig_listelemok = empty_list_elements_ok; | 47 warn_empty_list_elements = 0; |
47 empty_list_elements_ok = "true"; | |
48 | 48 |
49 if (nargin == 4) | 49 if (nargin == 4) |
50 n = 100; | 50 n = 100; |
51 elseif (nargin == 5) | 51 elseif (nargin == 5) |
52 if (!isscalar (t)) | 52 if (!isscalar (t)) |
79 | 79 |
80 x = filter (b, a, e); | 80 x = filter (b, a, e); |
81 x = x(n + 1 : t + n); | 81 x = x(n + 1 : t + n); |
82 | 82 |
83 unwind_protect_cleanup | 83 unwind_protect_cleanup |
84 | 84 warn_empty_list_elements = save_warn_empty_list_elements; |
85 empty_list_elements_ok = orig_listelemok; | |
86 | |
87 end_unwind_protect | 85 end_unwind_protect |
88 | 86 |
89 endfunction | 87 endfunction |