Skip to content

Commit 1d84554

Browse files
committed
Fix Matlab file
1 parent 851974d commit 1d84554

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

convolution/sinc_filter.m

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
low_low_f = 1150000;
2+
low_high_f = 1350000;
3+
4+
high_low_f = 2400000;
5+
high_high_f = 2600000;
6+
7+
filter_factor=1024;
8+
9+
x = linspace(-5,5,50);
10+
y = 2*low_high_f*sinc(2*low_high_f*x)-2*low_low_f*sinc(2*low_low_f*x);
11+
12+
fprintf("LOW FREQUENCY\n");
13+
for i = 1:20
14+
fprintf ('%d => \"%s\",\n', i-1, dec2bin(typecast(int16(filter_factor*y(i)),'uint16'),10));
15+
end
16+
17+
y = 2*high_high_f*sinc(2*high_high_f*x)-2*high_low_f*sinc(2*high_low_f*x);
18+
19+
fprintf("HIGH FREQUENCY\n");
20+
for i = 1:20
21+
fprintf ('%d => \"%s\",\n', i-1, dec2bin(typecast(int16(filter_factor*y(i)),'uint16'),10));
22+
end

0 commit comments

Comments
 (0)