[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43586] tf function outputs wrong results
From: |
Lukas Reichlin |
Subject: |
[Octave-bug-tracker] [bug #43586] tf function outputs wrong results |
Date: |
Sat, 22 Nov 2014 11:45:07 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/600.1.17 (KHTML, like Gecko) Version/6.2 Safari/537.85.10 |
Follow-up Comment #1, bug #43586 (project octave):
The tf function accepts any string as transfer function variable, even
'1/(s+1)':
octave:2> s = tf ('1/(s+1)')
Transfer function 's' from input 'u1' to output ...
y1: 1/(s+1)
Continuous-time model.
octave:3> sys = (s - 1)/(s^2 + 2*s + 1)
Transfer function 'sys' from input 'u1' to output ...
1/(s+1) - 1
y1: -------------------------
1/(s+1)^2 + 2 1/(s+1) + 1
Continuous-time model.
octave:4> s = tf ('string')
Transfer function 's' from input 'u1' to output ...
y1: string
Continuous-time model.
octave:5> sys = (s - 1)/(s^2 + 2*s + 1)
Transfer function 'sys' from input 'u1' to output ...
string - 1
y1: -----------------------
string^2 + 2 string + 1
Continuous-time model.
octave:6>
This can be useful, but also very misleading. As you can see below, the result
of your system c is always computed correctly:
octave:9> s = tf ('string')
Transfer function 's' from input 'u1' to output ...
y1: string
Continuous-time model.
octave:10> s(1)
ans = 0 + 1i
octave:11> s = tf ('s')
Transfer function 's' from input 'u1' to output ...
y1: s
Continuous-time model.
octave:12> s(1)
ans = 0 + 1i
octave:13>
One could argue that only 's' and 'z' (and maybe 'p' and 'q' for time domain)
should be accepted by tf, though.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43586>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/