changeset 10260:00bf15ad8b27 octave-forge

control-devel: minor changes
author paramaniac
date Tue, 15 May 2012 20:01:20 +0000
parents fde06f2c60b3
children 77e2b5a91c6b
files extra/control-devel/inst/arx.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/extra/control-devel/inst/arx.m	Tue May 15 15:22:00 2012 +0000
+++ b/extra/control-devel/inst/arx.m	Tue May 15 20:01:20 2012 +0000
@@ -26,6 +26,8 @@
 
 function sys = arx (dat, na, nb)
 
+  ## TODO: delays
+
   if (nargin != 3)
     print_usage ();
   endif
@@ -97,9 +99,10 @@
 function theta = __theta__ (phi, y, i, n)
     
   if (numel (phi) == 1)                             # single-experiment dataset
+    ## use "square-root algorithm"
     A = horzcat (phi{1}, y{1}(n(i)+1:end, i));      # [Phi, Y]
     R0 = triu (qr (A, 0));                          # 0 for economy-size R (without zero rows)
-    R1 = R0(1:end-1, 1:end-1);                      # R1 is triangular - can we exploit this in R1\R2
+    R1 = R0(1:end-1, 1:end-1);                      # R1 is triangular - can we exploit this in R1\R2?
     R2 = R0(1:end-1, end);
     theta = __ls_svd__ (R1, R2);                    # R1 \ R2