summaryrefslogtreecommitdiff
path: root/macros/arburg.sci
diff options
context:
space:
mode:
authoravinashlalotra2025-04-26 20:09:12 +0530
committeravinashlalotra2025-04-26 20:09:12 +0530
commitea7dcdba3b83696b97cc431ee050b58f9a0f3507 (patch)
tree49ea8ba898b88535c261546f4e3accbdf4c83bdf /macros/arburg.sci
parent725d9ee2ddb254f57a896bb47e0e727759eb5901 (diff)
downloadFOSSEE-Signal-Processing-Toolbox-ea7dcdba3b83696b97cc431ee050b58f9a0f3507.tar.gz
FOSSEE-Signal-Processing-Toolbox-ea7dcdba3b83696b97cc431ee050b58f9a0f3507.tar.bz2
FOSSEE-Signal-Processing-Toolbox-ea7dcdba3b83696b97cc431ee050b58f9a0f3507.zip
formated source documentation pattern for generating docs
Diffstat (limited to 'macros/arburg.sci')
-rw-r--r--macros/arburg.sci48
1 files changed, 1 insertions, 47 deletions
diff --git a/macros/arburg.sci b/macros/arburg.sci
index ee85ac5..faa47d5 100644
--- a/macros/arburg.sci
+++ b/macros/arburg.sci
@@ -1,11 +1,10 @@
+function varargout = arburg( x, poles, criterion )
//This function calculates coefficients of an autoregressive (AR) model of complex data
-
//Calling Sequence
//a = arburg(x, poles)
//a = arburg(x, poles, criterion)
//[a, v] = arburg(...)
//[a, v, k] = arburg(...)
-
//Parameters
//x: vector of real or complex numbers, of length > 2
//poles: positive integer value < length(x) - 2
@@ -13,61 +12,16 @@
//a: list of P+1 autoregression coefficients.
//v: mean square of residual noise from the whitening operation of the Burg lattice filter
//k: reflection coefficients defining the lattice-filter embodiment of the model
-
//Description
//This function calculates coefficients of an autoregressive (AR) model of complex data x using the whitening lattice-filter method of Burg.
//The first argument is the data sampled. The second argument is the number of poles in the model (or limit in case a criterion is supplied).
//The third parameter takes in the criterion to limit the number of poles. The acceptable values are "AIC", "AKICc", "KIC", "AICc" which are based on information theory.
-
//Examples
//arburg([1,2,3,4,5],2)
// ans =
//
// 1. - 1.8639053 0.9571006
-
-//*************************************************************************************
-//-------------------version1 (using callOctave / errored)-----------------------------
-//*************************************************************************************
-//function varargout = arburg( x, poles, criterion )
-//funcprot(0);
-//rhs = argn(2)
-//lhs = argn(1)
-//if(lhs>3)
-//error("Wrong number of output arguments.")
-//elseif(rhs<2)
-//error("Wrong number of input arguments.")
-//end
-//
-// select(lhs)
-// case 1 then
-// if(rhs==2)
-// a = callOctave("arburg",x,poles)
-// elseif(rhs==3)
-// a = callOctave("arburg",x,poles,criterion)
-// end
-// case 2 then
-// if(rhs==2)
-// [a,v] = callOctave("arburg",x,poles)
-// elseif(rhs==3)
-// [a,v] = callOctave("arburg",x,poles,criterion)
-// end
-// case 3 then
-// if(rhs==2)
-// [a,v,k] = callOctave("arburg",x,poles)
-// elseif(rhs==3)
-// [a,v,k] = callOctave("arburg",x,poles,criterion)
-// end
-// end
-//endfunction
-//
-
-//*************************************************************************************
-//-----------------------------version2 (pure scilab code)-----------------------------
-//*************************************************************************************
-
-function varargout = arburg( x, poles, criterion )
-
funcprot(0);
// Check arguments
[nargout nargin ] = argn() ;