blob: 2c33b3f75c9bd9ba033686f5db44ffe5fd48b412 (
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
32
33
|
function w = kaiser (m, beta)
//This function returns the filter coefficients of a Kaiser window.
//Calling Sequence
//w = kaiser (m)
//w = kaiser (m, beta)
//Parameters
//m: positive integer value
//beta: real scalar value
//w: output variable, vector of real numbers
//Description
//This is an Octave function.
//This function returns the filter coefficients of a Kaiser window of length m supplied as input, to the output vector w.
//The second parameter gives the stop band attenuation of the Fourier transform of the window on derivation.
//Examples
//kaiser(6,0.2)
//ans =
// 0.9900745
// 0.9964211
// 0.9996020
// 0.9996020
// 0.9964211
// 0.9900745
funcprot(0);
rhs = argn(2)
if(rhs<1 | rhs>2)
error("Wrong number of input arguments.")
end
if(rhs==1)
w = callOctave("kaiser", m)
elseif(rhs==2)
w = callOctave("kaiser", m, beta)
end
endfunction
|