|
From: | Hernán J . González |
Subject: | Re: Does dlyap (control package) works? |
Date: | Thu, 8 Dec 2016 00:02:49 -0300 |
On Wed, Dec 7, 2016 at 5:31 PM, Hernán J. González <address@hidden> wrote:______________________________I'm not sure if I'm missing something stupid.My issue is with dlyap function from "control" packagedlyap(C,D)is supposed to solveC*X*C' + D = Xbut it does not seem to work for me:p=0.3, q=1-p;C=[ q p 0 ; q 0 p ; q 0 0];D = [0 0 0; 0 0 0 ; p p p];X1=dlyap(C,D)0.034394 0.029959 0.0231440.029959 0.055090 0.0217130.023144 0.021713 0.316853C*X1*C'+D0.034394 0.029959 0.0231440.029959 0.055090 0.0217130.323144 0.321713 0.316853See the discrepancy in the last row.The correct solution seems to beA =0.50518 0.47078 0.360570.53824 0.50828 0.383280.64640 0.62326 0.54754I'm using :GNU Octave Version: 4.0.2Operating System: MINGW32_NT-6.1 Windows 7 Service Pack 1 i686package control 3.0.0_________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
I can confirm the same results using Octave 4.2.0 on Windows 7, 64-bit and control 3.0.0I don't know the purpose of the function, but it definitely falls under the matlab-incompatible category:Matlab 2016b:
>> p=0.3, q=1-p;
p =
0.3000
>> C=[ q p 0 ; q 0 p ; q 0 0];
>> D = [0 0 0; 0 0 0 ; p p p];
>> X1=dlyap(C,D)
X1 =
0.5052 0.4708 0.3606
0.5382 0.5083 0.3833
0.6464 0.6232 0.5475
>> C*X1*C'+D
ans =
0.5052 0.4708 0.3606
0.5382 0.5083 0.3833
0.6464 0.6232 0.5475unless someone can explain why not, this appears to be something that could be filed as a bug at bugs.octave.org. Hernan, would you mind doing so?
[Prev in Thread] | Current Thread | [Next in Thread] |