summaryrefslogtreecommitdiff
path: root/macros/is2rc.sci
blob: ad68f5fce5eb3b82ad06b2f26c96abf475a1c461 (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
34
35
36
37
38
function [k] = is2rc(isin)
// Convert inverse sine parameters to reflection coefficients
// 
// Calling Sequence
// K = is2rc(isin) 
// 
// Parameters
// isin: input inverse sine parameters. Needs to be an array real numbers
// k: output reflection coefficients  corresponding to the reflection coefficients in input
//
// Description
// This function returns a vector of reflection coefficients from a vector of inverse sine parameters
// output array has k(i) = sin(pi/2*isin(i))
//
// Example
// k = [0.3090 0.9801 0.0031 0.0082 -0.0082];
// isin = rc2is(k)      //Gives inverse sine parameters
// k_dash = is2rc(isin)
//
// See also 
// rc2is
// rc2poly
// rc2ac
// rc2lar
//
// Author
// Parthe Pandit
//
// Bibliography
// J.R. Deller, J.G. Proakis, J.H.L. Hansen, "Discrete-Time Processing of Speech Signals", Prentice Hall, Section 7.4.5

//errcheck1
if (~isreal(isin)),
 error('Input inverse sine coefficients are not real');
end           

k = sin(isin*%pi/2);
endfunction