help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Signal library problem


From: Nicholas Jankowski
Subject: Re: Signal library problem
Date: Thu, 23 May 2019 13:18:18 -0400


> A=[1 1 0; 1 -1 0; 0 0 -2];
>
> B=[2; 1; 1];
>
> C=[1 0 1];
>
> D=[0];
>
> ---Using matlab the result is this:
>
> >> [ num , den ] = ss2tf( A, B, C, D )
>
> num =
>
>      0     1     2     0
>
>
> den =
>
>      1     1    -2     0
>
>
> ---Using octave the result is:
>
> [ num , den ] = ss2tf( A, B, C, D )
> num =  1
> den =
>
>    1  -1
>
>


I do not get the same result as you.  
Using Octave 5.1.0 on Windows 10, signal v1.4.1, control 3.2.0

>> pkg load signal
>> A = [1 1 0; 1 -1 0; 0   0 2], B = [2;1;1], C = [1 0  1], D = [0]
A =
   1   1   0
   1  -1   0
   0   0   2
B =
   2
   1
   1
C =
   1   0   1
D = 0
>> [num,den]=ss2tf(A,B,C,D)
num =
   3.0000  -1.0000  -8.0000
den =
   1.0000  -2.0000  -2.0000   4.0000


and in Matlab 2018b:

>> A = [1 1 0; 1 -1 0; 0   0 2], B = [2;1;1], C = [1 0  1], D = [0]
A =
     1     1     0
     1    -1     0
     0     0     2
B =
     2
     1
     1
C =
     1     0     1
D =
     0
>> [num,den]=ss2tf(A,B,C,D)
num =
         0    3.0000   -1.0000   -8.0000
den =
    1.0000   -2.0000   -2.0000    4.0000



other than the extra zero in the numerator (is that a significant compatibility bug?) these answers seem equivalent. 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]