[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60677] [octave forge] (control) add functiona
From: |
Torsten Lilge |
Subject: |
[Octave-bug-tracker] [bug #60677] [octave forge] (control) add functionality to tf class |
Date: |
Thu, 27 May 2021 10:02:45 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 |
Follow-up Comment #4, bug #60677 (project octave):
abs (H) and angle (H) does not work in Matlab if H is really a tf object.
>From the document of your link, I don't think that H is really a tf object.
Instead, on page 215, H is defined as
H = freqs(num,den,w);
which is not a transfer function but the frequency response of a transfer
function with numerator num and denominator den. If you have a transfer
function H of a SISO system, then you have to do the following:
[num,den] = tfdata (H);
w = logspace (-2, 2, 500) % or whatever is suitable for your system
Hw = freqs (num{1}, den{1});
mag = abs (Hw);
phase = angle (Hw);
If you can confirm that this code works for you, I will close this report.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60677>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/