From: <par...@us...> - 2012-04-30 17:13:25
|
Revision: 10337 http://octave.svn.sourceforge.net/octave/?rev=10337&view=rev Author: paramaniac Date: 2012-04-30 17:13:19 +0000 (Mon, 30 Apr 2012) Log Message: ----------- control-devel: fix arx function partially, error term needs still some attention Modified Paths: -------------- trunk/octave-forge/extra/control-devel/inst/arx.m Modified: trunk/octave-forge/extra/control-devel/inst/arx.m =================================================================== --- trunk/octave-forge/extra/control-devel/inst/arx.m 2012-04-30 16:51:51 UTC (rev 10336) +++ trunk/octave-forge/extra/control-devel/inst/arx.m 2012-04-30 17:13:19 UTC (rev 10337) @@ -23,14 +23,15 @@ U = dat.u{1}; Ts = dat.tsam{1}; - PhiY = toeplitz (Y(1:end-1, :), zeros (1, na)); - PhiU = toeplitz (U(1:end-1, :), zeros (1, nb)); - Phi = [-PhiY, PhiU] + ## avoid warning: toeplitz: column wins anti-diagonal conflict + PhiY = toeplitz (Y(1:end-1, :), [Y(1, :); zeros(na-1, 1)]); + PhiU = toeplitz (U(1:end-1, :), [U(1, :); zeros(nb-1, 1)]); + Phi = [-PhiY, PhiU]; Theta = Phi \ Y(2:end, :); - A = [1; Theta(1:na)]; % ??? - B = Theta(na+1:end); + A = [1; Theta(1:na)]; # a0 = 1, a1 = Theta(1), an = Theta(n) + B = Theta(na+1:end); # b0 = 0 (leading zeros are removed by tf, no need to add one) sys = tf ({B, 1}, {A, A}, Ts); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |