summaryrefslogtreecommitdiff
path: root/macros/aryule.sci
diff options
context:
space:
mode:
Diffstat (limited to 'macros/aryule.sci')
-rw-r--r--macros/aryule.sci35
1 files changed, 2 insertions, 33 deletions
diff --git a/macros/aryule.sci b/macros/aryule.sci
index dd4ac7c..4bab4cd 100644
--- a/macros/aryule.sci
+++ b/macros/aryule.sci
@@ -1,55 +1,24 @@
-//This function fits an AR (p)-model with Yule-Walker estimates.
+function [a, v, k] = aryule (x, p)
+//This function fits an AR (p)-model with Yule-Walker estimates.
//Calling Sequence
//a = aryule (x, p)
//[a, v] = aryule (x, p)
//[a, v, k] = aryule (x, p)
-
//Parameters
//x: vector of real or complex numbers, length > 2
//p: positive integer value < length(x) - 1
//a: gives the AR coefficients
//v: gives the variance of the white noise,
//k: gives the reflection coefficients to be used in the lattice filter
-
//Description
//This function fits an AR (p)-model with Yule-Walker estimates.
//The first argument is the data vector which is to be estimated.
-
//Examples
//aryule([1,2,3,4,5],2)
//ans =
// 1. - 0.8140351 0.1192982
-//*************************************************************************************
-//-------------------version1 (using callOctave / errored)-----------------------------
-//*************************************************************************************
-//function [a, v, k] = aryule (x, p)
-//funcprot(0);
-//rhs = argn(2)
-//lhs = argn(1)
-//
-//if(rhs~=2)
-//error("Wrong number of input arguments.")
-//end
-//
-// select(lhs)
-// case 1 then
-// a = callOctave("aryule",x,p)
-// case 2 then
-// [a,v] = callOctave("aryule",x,p)
-// case 3 then
-// [a,v,k] = callOctave("aryule",x,p)
-// end
-//
-//endfunction
-
-//*************************************************************************************
-//-----------------------------version2 (pure scilab code)-----------------------------
-//*************************************************************************************
-
-function [a, v, k] = aryule (x, p)
-
[nargout,nargin] = argn() ;
if ( nargin~=2 )