blob: 4c3b97a064743bb948740b20bf70f8356d969200 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Function Name = Frequency sampling
// Inputs = Frequency response Hd; frequency vectors f1, f2; dimension [m n]
// Output = matrix h of dimension m x n, stores the filter coeff
function[h] = fsamp2(Hd, varargin)
[lhs, rhs] = argn(0)
select rhs
case 1 then
out = opencv_fsamp2(Hd)
case 2 then
out = opencv_fsamp2(Hd, varargin(1))
case 3 then
out = opencv_fsamp2(Hd, varargin(1), varargin(2))
case 4 then
out = opencv_fsamp2(Hd, varargin(1), varargin(2), varargin(3))
end
channel = size(out)
for i = 1: channel
h(:,:,i) = out(i)
end
endfunction
|