summaryrefslogtreecommitdiff
path: root/macros/armcov.sci
diff options
context:
space:
mode:
authorshamikam2017-11-07 15:59:48 +0530
committershamikam2017-11-07 15:59:48 +0530
commitc0c0582462720ed597b00e116506570577614e89 (patch)
tree31dedd23698e5357b19c810b7d7a8464100ef44a /macros/armcov.sci
downloadFOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.gz
FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.bz2
FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.zip
initial commit
Diffstat (limited to 'macros/armcov.sci')
-rw-r--r--macros/armcov.sci22
1 files changed, 22 insertions, 0 deletions
diff --git a/macros/armcov.sci b/macros/armcov.sci
new file mode 100644
index 0000000..0c5158c
--- /dev/null
+++ b/macros/armcov.sci
@@ -0,0 +1,22 @@
+function [ar_coeff, var_est] = armcov(data_in, order)
+
+ checkNArgin(2,2, argn(2));
+ method = 'modified';
+ [ar_coeff, var_est, msg] = arParEst(data_in, order, method);
+ if ~isempty(msg) then
+ error(msg);
+ end
+
+
+endfunction
+
+function checkNArgin(min_argin, max_argin, num_of_argin)
+ if num_of_argin < min_argin then
+ error('Not enough input arguments')
+ end
+
+ if num_of_argin > max_argin then
+ error('Too many input arguments')
+ end
+
+endfunction