summaryrefslogtreecommitdiff
path: root/macros/is2rc.sci
diff options
context:
space:
mode:
authorSunil Shetye2018-07-25 17:11:09 +0530
committerSunil Shetye2018-07-26 23:50:17 +0530
commit1251f70aa3442736ce6fd9c4fb7fbce412af5a52 (patch)
tree360311ffaf6151c5066439f481e8ac38cfd047b9 /macros/is2rc.sci
parent9ca7882cee16ad48b18df989e8300c697010e55a (diff)
downloadFOSSEE-Signal-Processing-Toolbox-1251f70aa3442736ce6fd9c4fb7fbce412af5a52.tar.gz
FOSSEE-Signal-Processing-Toolbox-1251f70aa3442736ce6fd9c4fb7fbce412af5a52.tar.bz2
FOSSEE-Signal-Processing-Toolbox-1251f70aa3442736ce6fd9c4fb7fbce412af5a52.zip
code changes by Kartik Hegde during FOSSEE Fellowship 2018
Diffstat (limited to 'macros/is2rc.sci')
-rw-r--r--macros/is2rc.sci86
1 files changed, 48 insertions, 38 deletions
diff --git a/macros/is2rc.sci b/macros/is2rc.sci
index ad68f5f..864365b 100644
--- a/macros/is2rc.sci
+++ b/macros/is2rc.sci
@@ -1,38 +1,48 @@
-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
+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)
+//
+// OUTPUT :
+// isin = [0.1999886 0.8727832 0.0019735 0.0052203.....- 0.0052203 ]
+// k_dash =[0.309 0.9801 0.0031 0.0082 - 0.0082]
+
+//isin = [0.2000 0.8727 0.0020 0.0052 -0.0052];
+//k = is2rc(isin)
+//
+//OUTPUT :
+// k = [0.3090170 0.9800741 0.0031416 0.0081681..... - 0.0081681 ]
+
+// 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