diff options
author | Sunil Shetye | 2018-07-25 16:27:51 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-26 23:50:17 +0530 |
commit | 9ca7882cee16ad48b18df989e8300c697010e55a (patch) | |
tree | 59e0c6116b835ae3e5e3208bc9609ed2828069ed /help/en_US/lpc.xml | |
parent | 6bbb00d0f0128381ee95194cf7d008fb6504de7d (diff) | |
download | FOSSEE-Signal-Processing-Toolbox-9ca7882cee16ad48b18df989e8300c697010e55a.tar.gz FOSSEE-Signal-Processing-Toolbox-9ca7882cee16ad48b18df989e8300c697010e55a.tar.bz2 FOSSEE-Signal-Processing-Toolbox-9ca7882cee16ad48b18df989e8300c697010e55a.zip |
code changes by Sonu Sharma during FOSSEE Fellowship 2018
Diffstat (limited to 'help/en_US/lpc.xml')
-rw-r--r-- | help/en_US/lpc.xml | 67 |
1 files changed, 47 insertions, 20 deletions
diff --git a/help/en_US/lpc.xml b/help/en_US/lpc.xml index 1ebe531..079923e 100644 --- a/help/en_US/lpc.xml +++ b/help/en_US/lpc.xml @@ -18,6 +18,7 @@ <refnamediv> <refname>lpc</refname> <refpurpose>Linear prediction filter coefficients</refpurpose> + <para> </para> </refnamediv> @@ -26,9 +27,8 @@ <synopsis> [a,g] = lpc(x) [a,g] = lpc(x,p) - - </synopsis> + <para> </para> </refsynopsisdiv> <refsection> @@ -36,44 +36,71 @@ <para> [a,g] = lpc(x,p) Determines the coefficients of a pth order forward linear predictor -filter by minimizing the squared error. If p is unspecified, a -default value of length(x)-1 is used. +filter by minimizing the squared error. <para>If p is unspecified, a +default value of length(x)-1 is used.</para> </para> - <para> -</para> + <para> </para> </refsection> <refsection> <title>Parameters</title> <variablelist> <varlistentry><term>x:</term> - <listitem><para> double</para></listitem></varlistentry> + <listitem><para> double</para><para>input signal, if it is a matrix each column is computed independently</para></listitem></varlistentry> <varlistentry><term>p:</term> - <listitem><para> int, natural number, scalar</para></listitem></varlistentry> + <listitem><para> int, natural number, scalar</para><para>order of linear predictor filter, value must be scalar, positive and must be less than or equal to length of input signal </para></listitem></varlistentry> <varlistentry><term>a:</term> - <listitem><para> double</para></listitem></varlistentry> + <listitem><para> double</para><para>coefficient of forward linear predictor, coefficient for each signal input is returned as a row vector</para></listitem></varlistentry> <varlistentry><term>g:</term> - <listitem><para> double</para></listitem></varlistentry> + <listitem><para> double</para><para>Column vector of averaged square prediction error</para></listitem></varlistentry> </variablelist> </refsection> <refsection> + <title>Description</title> + <para> This function determines coefficients of a forward linear predictor by minimizing prediction error in least squares sense. It is used in Digital Filter Design </para> + <para> </para> +</refsection> + +<refsection> <title>Examples</title> - <programlisting role="example"><![CDATA[ -1) -noise = randn(20000,1); -x = filter(1,[1 1/5 1/3 1/4],noise); -x = x(15904:20000); -[a,g] = lpc(x,3); + <programlisting role="example"><![CDATA[ +noise = rand(50000,1,"normal"); //Gaussian White Noise +x = filter(1,[1 1/2 1/3 1/4],noise); +x = x(45904:50000); +[a,g]= lpc(x,3) +est_x = filter([0 -a(2:$)],1,x); +e = x-est_x; +[acs,lags] = xcorr(e,'coeff'); +plot(1:97,x(4001:4097),1:97,est_x(4001:4097),'--'); +a = gca(); +a.grid = [1,1]; +title 'Original Signal vs. LPC Estimate'; +xlabel 'Sample number', ylabel 'Amplitude'; +legend('Original signal','LPC estimate'); + ]]></programlisting> -References -[1] Hayes, Monson H. Statistical digital signal processing and modeling. -John Wiley & Sons, 2009, pg. 220 + <scilab:image> +noise = rand(50000,1,"normal"); //Gaussian White Noise +x = filter(1,[1 1/2 1/3 1/4],noise); +x = x(45904:50000); +[a,g]= lpc(x,3) +est_x = filter([0 -a(2:$)],1,x); +e = x-est_x; +[acs,lags] = xcorr(e,'coeff'); +plot(1:97,x(4001:4097),1:97,est_x(4001:4097),'--'); +a = gca(); +a.grid = [1,1]; +title 'Original Signal vs. LPC Estimate'; +xlabel 'Sample number', ylabel 'Amplitude'; +legend('Original signal','LPC estimate'); + </scilab:image> + <para> </para> - ]]></programlisting> </refsection> + <refsection> <title>See also</title> <simplelist type="inline"> |