octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #43586] tf function outputs wrong results


From: Arnaud Miege
Subject: [Octave-bug-tracker] [bug #43586] tf function outputs wrong results
Date: Wed, 12 Nov 2014 10:57:14 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?43586>

                 Summary: tf function outputs wrong results
                 Project: GNU Octave
            Submitted by: am304
            Submitted on: Wed 12 Nov 2014 10:57:13 GMT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

The  tf  function from the control package can output the wrong result if the
transfer function is not correctly entered, and it does not error out. The
details can be found at this StackOverflow question
<http://stackoverflow.com/questions/26869827/octave-control-package-tf> but in
essence, it boils down to the following:


>> a = tf(1,[1 1])

Transfer function 'a' from input 'u1' to output ...

        1
 y1:  -----
      s + 1

Continuous-time model.
>> a(1)
ans =  0.50000 - 0.50000i
>> b = 1/(tf('s')+1)

Transfer function 'b' from input 'u1' to output ...

        1
 y1:  -----
      s + 1

Continuous-time model.
>> b(1)
ans =  0.50000 - 0.50000i
>> c = tf('1/(s+1)')

Transfer function 'c' from input 'u1' to output ...

 y1:  1/(s+1)

Continuous-time model.
>> c(1)
ans =  0 + 1i
>> s = tf('s')

Transfer function 's' from input 'u1' to output ...

 y1:  s

Continuous-time model.
>> d = 1/(s+1)

Transfer function 'd' from input 'u1' to output ...

        1
 y1:  -----
      s + 1

Continuous-time model.
>> d(1)
ans =  0.50000 - 0.50000i


 c  is incorrectly defined, but Octave does error out when doing so, and it
then reports the wrong result.






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?43586>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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