to analysis the frequency response of any transfer function we use FREQS (for analog system or for S-domain) & FREQZ (for digital system or for Z-domain).
Program (for S-domain):
clear
clc
num=input('enter the coefficient of numerator: ');
den=input('enter the coefficient of denominator: ');
freqs(num,den)
Output:
enter the coefficient of numerator: 1
enter the coefficient of denominator: [1 2 8]
Program (for Z-domain):
clear
clc
num=input('enter the coefficient of numerator: ');
den=input('enter the coefficient of denominator: ');
freqz(num,den)
Output:
enter the coefficient of numerator: [1 1 2]
enter the coefficient of denominator: [2 1 3]
Program (for S-domain):
clear
clc
num=input('enter the coefficient of numerator: ');
den=input('enter the coefficient of denominator: ');
freqs(num,den)
Output:
enter the coefficient of numerator: 1
enter the coefficient of denominator: [1 2 8]
Program (for Z-domain):
clear
clc
num=input('enter the coefficient of numerator: ');
den=input('enter the coefficient of denominator: ');
freqz(num,den)
Output:
enter the coefficient of numerator: [1 1 2]
enter the coefficient of denominator: [2 1 3]