<< feedback | Control System functions | gensig >> |
[H, wout] = freqresp(sys, w) |
H = freqresp(sys, w) |
LTI model
Frequencies: vector
Frequency response values
Output frequencies corresponding to the frequency response: vector.
freqresp computes the frequency response of a dynamic system sys at specified frequencies w.
To acquire magnitude and phase data, along with visual representations of the frequency response, utilize the bode function.
G = tf(1,[1 1]);
h1 = freqresp(G, 3)
num = [1 2];
den = [1 3 2];
sys = tf(num,den);
w = linspace(0, 100, 60);
[resp,freq] = freqresp(sys, w);
f = figure();
subplot(2, 1, 1);
plot(freq, 20 * log10(abs(squeeze(resp))));
ylabel(_('Amplitude (dB)'));
subplot(2, 1, 2);
plot(freq, angle(squeeze(resp)) * 180/pi);
ylabel(_('Phase (degrees)'));
xlabel(_('Frequency (Hz)'));
Version | Description |
---|---|
1.0.0 | initial version |
Allan CORNET