- added cic_plot
git-svn-id: http://moon:8086/svn/matlab/trunk@155 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
function cic_plot(M, N, R)
|
||||
% cic_plot(M, N, R)
|
||||
|
||||
ns = 1000;
|
||||
f = 2*(1:ns)/ns;
|
||||
H = abs(sin(pi*M.*f)./sin(pi.*f/R)).^N;
|
||||
|
||||
subplot(2,1,1)
|
||||
plot(f,H);
|
||||
xlabel('f / fs');
|
||||
ylabel('G');
|
||||
grid;
|
||||
|
||||
Gain = (R*M)^N
|
||||
BitGrowth = ceil(N*log2(R*M))
|
||||
|
||||
subplot(2,1,2)
|
||||
plot(f,20*log10(H/Gain));
|
||||
xlabel('f / fs');
|
||||
ylabel('A/dB');
|
||||
grid;
|
||||
|
||||
Atten_fs2 = 20*log10(H(ns/2)/Gain)
|
||||
Reference in New Issue
Block a user