double_canceler.m
上传用户:szahd2008
上传日期:2020-09-25
资源大小:1275k
文件大小:1k
- function [resp] = double_canceler(fofr1)
- eps = 0.00001;
- fofr = 0:0.01:fofr1;
- arg1 = pi .* fofr;
- resp = 4.0 .* ((sin(arg1)).^2);
- max1 = max(resp);
- resp = resp ./ max1;
- resp2 = resp .* resp;
- subplot(2,1,1);
- plot(fofr,resp,'k--',fofr, resp2,'k');
- ylabel ('Amplitude response - Volts')
- resp2 = 20. .* log10(resp2+eps);
- resp1 = 20. .* log10(resp+eps);
- subplot(2,1,2)
- plot(fofr,resp1,'k--',fofr,resp2,'k');
- legend ('single canceler','double canceler')
- xlabel ('Normalized frequency f/fr')
- ylabel ('Amplitude response - dB')