diff options
Diffstat (limited to '2048/DEPENDENCIES/tfvar.sci')
-rw-r--r-- | 2048/DEPENDENCIES/tfvar.sci | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/2048/DEPENDENCIES/tfvar.sci b/2048/DEPENDENCIES/tfvar.sci new file mode 100644 index 000000000..424624d9f --- /dev/null +++ b/2048/DEPENDENCIES/tfvar.sci @@ -0,0 +1,16 @@ +// Cancellation of common factors and determination of covariance
+// 11.7
+
+// function [N,dN,D,dD,yvar] = tfvar(N,dN,D,dD)
+// N and D polynomials in z^{-1} form; discrete case
+
+function [N,dN,D,dD,yvar] = tfvar(N,dN,D,dD)
+
+[N,dN,D,dD] = l2r(N,dN,D,dD);
+N = N/D(1); D = D/D(1);
+LN = length(N); LD = length(D);
+D1 = D;
+if LD<LN, D1 = [D zeros(1,LN-LD)]; dD1 = dD+LN-LD; end
+H = tf(N,D1,1);//TS=1 (sampling time) has been taken constant in tfvar
+yvar = covar_m(H,1);
+endfunction;
|