summaryrefslogtreecommitdiff
path: root/macros/is2rc.sci
diff options
context:
space:
mode:
authorshamikam2017-11-07 15:59:48 +0530
committershamikam2017-11-07 15:59:48 +0530
commitc0c0582462720ed597b00e116506570577614e89 (patch)
tree31dedd23698e5357b19c810b7d7a8464100ef44a /macros/is2rc.sci
downloadFOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.gz
FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.bz2
FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.zip
initial commit
Diffstat (limited to 'macros/is2rc.sci')
-rw-r--r--macros/is2rc.sci38
1 files changed, 38 insertions, 0 deletions
diff --git a/macros/is2rc.sci b/macros/is2rc.sci
new file mode 100644
index 0000000..ad68f5f
--- /dev/null
+++ b/macros/is2rc.sci
@@ -0,0 +1,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