summaryrefslogtreecommitdiff
path: root/macros/levin.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/levin.sci')
-rw-r--r--macros/levin.sci31
1 files changed, 16 insertions, 15 deletions
diff --git a/macros/levin.sci b/macros/levin.sci
index 16d3768..2225222 100644
--- a/macros/levin.sci
+++ b/macros/levin.sci
@@ -1,20 +1,21 @@
function [ar, sigma2,rc] = levin(r);
-// //[ar,sigma2,rc]=lev(r)
-// //Resolve the Yule-Walker equations:
-// //
-// // |r(0) r(1) ... r(N-1)|| a(1) | |sigma2|
-// // |r(1) r(0) ... r(n-1)|| a(2) | | 0 |
-// // | : : ... : || : |=| 0 |
-// // | : : ... : || : | | 0 |
-// // |r(N-1) r(N-2) ... r(0) ||a(N-1)| | 0 |
-// //
-// //using Levinson's algorithm.
-// // r :Correlation coefficients
-// // ar :Auto-Regressive model parameters
-// // sigma2 :Scale constant
-// // rc :Reflection coefficients
-
+// Resolve the Yule-Walker equations:
+// Calling Sequence
+// [ar,sigma2,rc]=lev(r)
+// Description
+// |r(0) r(1) ... r(N-1)|| a(1) | |sigma2|
+// |r(1) r(0) ... r(n-1)|| a(2) | | 0 |
+// | : : ... : || : |=| 0 |
+// | : : ... : || : | | 0 |
+// |r(N-1) r(N-2) ... r(0) ||a(N-1)| | 0 |
+//
+//using Levinson's algorithm.
+// r :Correlation coefficients
+// ar :Auto-Regressive model parameters
+// sigma2 :Scale constant
+// rc :Reflection coefficients
// Example :
+
if length(r)==1 then
ar=1;
sigma2=r;