diff options
author | Sunil Shetye | 2018-07-25 17:32:17 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-26 23:50:17 +0530 |
commit | cdd55940b7a287810e423017c42e7c965815c468 (patch) | |
tree | d802563d2d507039354a3cf48e75465b7e7a8d76 /help/en_US | |
parent | 1251f70aa3442736ce6fd9c4fb7fbce412af5a52 (diff) | |
download | FOSSEE-Signal-Processing-Toolbox-cdd55940b7a287810e423017c42e7c965815c468.tar.gz FOSSEE-Signal-Processing-Toolbox-cdd55940b7a287810e423017c42e7c965815c468.tar.bz2 FOSSEE-Signal-Processing-Toolbox-cdd55940b7a287810e423017c42e7c965815c468.zip |
code changes by Shashikiran Yadalam during FOSSEE Fellowship 2018
Diffstat (limited to 'help/en_US')
39 files changed, 1704 insertions, 180 deletions
diff --git a/help/en_US/deconv.xml b/help/en_US/deconv.xml new file mode 100644 index 0000000..c056db2 --- /dev/null +++ b/help/en_US/deconv.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from deconv.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="deconv" xml:lang="en" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:ns3="http://www.w3.org/1999/xhtml" + xmlns:mml="http://www.w3.org/1998/Math/MathML" + xmlns:scilab="http://www.scilab.org" + xmlns:db="http://docbook.org/ns/docbook"> + + <refnamediv> + <refname>deconv</refname> + <refpurpose>Deconvolve two vectors.</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [b,r]= deconv (y, a) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>y:</term> + <listitem><para>Input vector. The convolution of a and b.</para></listitem></varlistentry> + <varlistentry><term>a:</term> + <listitem><para>The input vector.</para></listitem></varlistentry> + <varlistentry><term>b:</term> + <listitem><para> The quotient polynomial coeffecients vector.</para></listitem></varlistentry> + <varlistentry><term>r:</term> + <listitem><para>The remainder polynomial coefficients vector. </para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +[b, r] = deconv (y, a) solves for b and r such that + y = conv (a, b) + r.</para> +<para> +If y and a are polynomial coefficient vectors, b will + contain the coefficients of the polynomial quotient and r will be + a remainder polynomial of lowest order. + +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +[b, r] = deconv ([3, 6, 9, 9], [1, 2, 3]) +//Output: +//b=[3, 0] +//r=[0, 0, 0, 9] + ]]></programlisting> +</refsection> + +</refentry> diff --git a/help/en_US/gausswin.xml b/help/en_US/gausswin.xml index 9d1af4a..a128a08 100644 --- a/help/en_US/gausswin.xml +++ b/help/en_US/gausswin.xml @@ -44,7 +44,7 @@ <refsection> <title>Description</title> <para> -This is an Octave function. + This function returns the filter coefficients of a Gaussian window of length m supplied as input, to the output vector w. The second parameter is the width measured in sample rate/number of samples and should be f for time domain and 1/f for frequency domain. The width is inversely proportional to a. </para> @@ -54,10 +54,10 @@ The second parameter is the width measured in sample rate/number of samples and <title>Examples</title> <programlisting role="example"><![CDATA[ gausswin(3) -ans = -0.2493522 -1. -0.2493522 +//ans = +//0.2493522 +//1. +//0.2493522 ]]></programlisting> </refsection> </refentry> diff --git a/help/en_US/gmonopuls.xml b/help/en_US/gmonopuls.xml index 72436d9..f514aa4 100644 --- a/help/en_US/gmonopuls.xml +++ b/help/en_US/gmonopuls.xml @@ -34,18 +34,27 @@ <refsection> <title>Description</title> <para> -This is an Octave function + This function returns samples of the Gaussian monopulse of amplitude unity. </para> </refsection> <refsection> - <title>Examples</title> + <title>Example 1.</title> <programlisting role="example"><![CDATA[ -1. gmonopuls([1 2 3],0.1) -ans= 0.85036 0.94070 0.52591 -2. gmonopuls([1 2 3]) -ans= 0 0 0 + gmonopuls([1 2 3],0.1) +//ans= 0.85036 0.94070 0.52591 + ]]></programlisting> </refsection> + +<refsection> + <title>Example 2.</title> + <programlisting role="example"><![CDATA[ + + gmonopuls([1 2 3],[]) +//ans= 0 0 0 + ]]></programlisting> +</refsection> + </refentry> diff --git a/help/en_US/mexihat.xml b/help/en_US/mexihat.xml index 3306e6f..81f77a1 100644 --- a/help/en_US/mexihat.xml +++ b/help/en_US/mexihat.xml @@ -43,7 +43,7 @@ <refsection> <title>Description</title> <para> -This is an Octave function +This is an Octave function which is built in scilab. This function returns values of the Mexican hat wavelet in the specified interval at all the sample points. </para> </refsection> @@ -52,11 +52,11 @@ This function returns values of the Mexican hat wavelet in the specified interva <title>Examples</title> <programlisting role="example"><![CDATA[ 1. [a,b]= mexihat(1,2,3) -a = [0.00000 -0.35197 -0.35214] -b = [1.0000 1.5000 2.0000] +//a = [0.00000 -0.35197 -0.35214] +//b = [1.0000 1.5000 2.0000] 2. [a,b]= mexihat([1 2 3],1,1) -a = [0;0;0] -b = [1;1;1] +//a = [0;0;0] +//b = [1;1;1] ]]></programlisting> </refsection> </refentry> diff --git a/help/en_US/mpoles.xml b/help/en_US/mpoles.xml new file mode 100644 index 0000000..99ff1d2 --- /dev/null +++ b/help/en_US/mpoles.xml @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from mpoles.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="mpoles" xml:lang="en" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:ns3="http://www.w3.org/1999/xhtml" + xmlns:mml="http://www.w3.org/1998/Math/MathML" + xmlns:scilab="http://www.scilab.org" + xmlns:db="http://docbook.org/ns/docbook"> + + <refnamediv> + <refname>mpoles</refname> + <refpurpose>Identifies unique poles in p and their associated multiplicity.</refpurpose> + </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [multp, idxp] = mpoles (p) + [multp, idxp] = mpoles (p, tol) + [multp, idxp] = mpoles (p, tol, reorder) + </synopsis> +</refsynopsisdiv> + + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>p:</term> + <listitem><para> Real vector whose poles has to be calculated</para></listitem></varlistentry> + <varlistentry><term>tol:</term> + <listitem><para> tolerence,by default, tol=0.001</para></listitem></varlistentry> + <varlistentry><term>reorder:</term> + <listitem><para> the optional parameter, if reorder is zero, poles are not sorted.</para></listitem></varlistentry> + <varlistentry><term>multp:</term> + <listitem><para> is a vector specifying the multiplicity of the poles.</para></listitem></varlistentry> +<varlistentry><term>indxp:</term> + <listitem><para> indices of the poles</para></listitem></varlistentry> + +</variablelist> +</refsection> +<refsection> + <title>Description</title> + <para> +The output is ordered from largest to the smallest poles. If the relative difference between the poles is less than the tolerance(tol), then those poles are considered as multiples. By default, the tolerance value is 0.001. +</para> + +<para> +If the optional parameter, reorder is 0, then the poles are not sorted. +</para> +</refsection> +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + p = [2 3 1 1 2]; + [m, n] = mpoles (p) +// n = +// 2. +// 5. +// 1. +// 4. +// 3. +// m = +// 1. +// 1. +// 2. +// 1. +// 2. + ]]></programlisting> +</refsection> + +</refentry> diff --git a/help/en_US/pchip.xml b/help/en_US/pchip.xml index c9aaa34..059f02e 100644 --- a/help/en_US/pchip.xml +++ b/help/en_US/pchip.xml @@ -17,7 +17,65 @@ <refnamediv> <refname>pchip</refname> - <refpurpose></refpurpose> + <refpurpose>This function returns piecewise cubic hermite interpolating polynomial.</refpurpose> </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + d=pchip(x,y) + d= pchip(x,y,xx) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>x:</term> + <listitem><para> points at which the function is defined</para></listitem></varlistentry> + </variablelist> +<variablelist> + <varlistentry><term>y:</term> + <listitem><para> function of variable x</para><para>Note that the lengths of x and y should be the same.</para></listitem></varlistentry> + </variablelist> +<variablelist> + <varlistentry><term>xx:</term> + <listitem><para> points of interpolation</para></listitem></varlistentry> + </variablelist> +<variablelist> + <varlistentry><term>d:</term> + <listitem><para> vector of interpolantant at xx +</para></listitem></varlistentry> + </variablelist> + +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + x=[0 1 2 3 4 5] + y=[1 0 1 0 1 0] + xx=linspace(0,5,800) + v=pchip(x, y) + v=pchip(x,y,xx) + plot(x,y,xx,v,'o') + ]]></programlisting> + +<scilab:image> + + x=[0 1 2 3 4 5] + y=[1 0 1 0 1 0] + xx=linspace(0,5,800) + v=pchip(x, y) + v=pchip(x,y,xx) + plot(x,y,xx,v,'o') +</scilab:image> + +</refsection> + + + + + + </refentry> diff --git a/help/en_US/peak2rms.xml b/help/en_US/peak2rms.xml index dd21dae..4e1e4e0 100644 --- a/help/en_US/peak2rms.xml +++ b/help/en_US/peak2rms.xml @@ -73,13 +73,13 @@ If the elements of matrix are complex the absolute values are considered in the <refsection> <title>Examples</title> <programlisting role="example"><![CDATA[ -To calculate peak2rms of a vector: +//To calculate peak2rms of a vector: IN=[6 19 10 25] OUT=peak2rms(IN) -The output is OUT= -1.4638501 -1.3887301 -1.119186 +//The output is OUT= +//1.4638501 +//1.3887301 +//1.119186 ]]></programlisting> </refsection> @@ -90,8 +90,8 @@ The output is OUT= To calculate peak2rms of rows of matrix: IN=[1 3 5;2 4 6;7 8 9] OUT=peak2rms(IN,2) -The output is -OUT= 1.3719887 +//The output is +//OUT= 1.3719887 ]]></programlisting> </refsection> @@ -104,8 +104,8 @@ To calculate peak magnitude to RMS value of sinusoid: t=0:0.6:9 IN=cos(6*%pi*t); OUT= peak2rms(IN) -The output is -OUT= 1.3719887 +//The output is +//OUT= 1.3719887 ]]></programlisting> </refsection> diff --git a/help/en_US/peig.xml b/help/en_US/peig.xml index 8c85698..b19c370 100644 --- a/help/en_US/peig.xml +++ b/help/en_US/peig.xml @@ -33,52 +33,121 @@ [S,f] = peig(x,p,nfft,fs,nwin,noverlap) [...] = peig(...,freqrange) [...,v,e] = peig(...) - - Parameters: - x - int|double - vector|matrix - Input signal. In case of a matrix, each row of x represents a + + + + + + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>x:</term> + <listitem><para> int|double - vector|matrix</para> +<para>Input signal. In case of a matrix, each row of x represents a seperate observation of the signal. If 'corr' flag is specified, then x is the correlation matrix. If w is not specified in the input, it is determined by the algorithm. If x is real valued, then range of w is [0, pi]. - Otherwise, the range of w is [0, 2pi) - p - int|double - scalar|vector - p(1) is the dimension of the signal subspace + Otherwise, the range of w is [0, 2pi)</para> +</listitem></varlistentry> + </variablelist> + +<variablelist> + <varlistentry><term>p:</term> + <listitem><para> int|double - scalar|vector</para> +<para>p(1) is the dimension of the signal subspace p(2), if specified, represents a threshold that is multiplied by - the smallest estimated eigenvalue of the signal's correlation matrix. - w - int|double - vector - w is the vector of normalized frequencies over which the - pseuspectrogram is to be computed. - nfft - int - scalar (Default = 256) - Length of the fft used to compute pseudospectrum. The length of S + the smallest estimated eigenvalue of the signal's correlation matrix.</para> + +</listitem></varlistentry> + </variablelist> + +<variablelist> +<varlistentry><term>w:</term> + <listitem><para> int|double - vector</para> +<para>w is the vector of normalized frequencies over which the + pseuspectrogram is to be computed.</para> + +</listitem></varlistentry> + +</variablelist> + + +<variablelist> +<varlistentry><term>nfft:</term> + <listitem><para> int - scalar (Default = 256)</para> +<para>Length of the fft used to compute pseudospectrum. The length of S (and hence w/f) depends on the type of values in x and nfft. If x is real, length of s is (nfft/2 + 1) {Range of w = [0, pi]} if nfft is even and (nfft+1)/2 {Range of w = [0, pi)} otherwise. - If x is complex, length of s is nfft. - fs - int|double - scalar (Default = 1) - Sampling rate. Used to convert the normalized frequencies (w) to - actual values (f) and vice-versa. - nwin - int|double - scalar (int only)|vector (Default = 2*p(1)) - If nwin is scalar, it is the length of the rectangular window. + If x is complex, length of s is nfft.</para> + +</listitem></varlistentry> + +</variablelist> + +<variablelist> +<varlistentry><term>fs:</term> + <listitem><para> int|double - scalar (Default = 1)</para> +<para>Sampling rate. Used to convert the normalized frequencies (w) to + actual values (f) and vice-versa.</para> + +</listitem></varlistentry> + +</variablelist> + +<variablelist> +<varlistentry><term>nwin:</term> + <listitem><para> int|double - scalar (int only)|vector (Default = 2*p(1))</para> +<para> If nwin is scalar, it is the length of the rectangular window. Otherwise, the vector input is considered as the window coefficients. - Not used if 'corr' flag present. - If x is a vector, windowing not done in nwin in scalar. If x is a - matrix, - noverlap - int - scalar (Default = nwin-1) - number of points by which successive windows overlap. noverlap not - used if x is a matrix - freqrange - string - The range of frequencies over which the pseudospetrogram is + Not used if 'corr' flag present.</para> + +</listitem></varlistentry> + +</variablelist> +<variablelist> +<varlistentry><term>noverlap:</term> + <listitem><para> int - scalar (Default = nwin-1)</para> +<para> number of points by which successive windows overlap. noverlap not + used if x is a matrix</para> + +</listitem></varlistentry> + +</variablelist> +<variablelist> +<varlistentry><term>freqrange:</term> + <listitem><para> string</para> +<para>The range of frequencies over which the pseudospetrogram is computed. Three possible values - 'onesided', 'twosided', 'centered' 'corr' flag Presence indicates that the primary input x is actually a correlation matrix - - Examples: - TODO: - - </synopsis> -</refsynopsisdiv> + </para> + +</listitem></varlistentry> + +</variablelist> +</refsection> + + + + + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + + fs = 100; + t = 0:1/fs:1-1/fs; + s = 2*sin(2*%pi*25*t)+sin(2*%pi*35*t)+rand(1,100,"normal"); + [S,w]=peig(s,2,512,fs,'half'); + plot(w,S); + ]]></programlisting> +</refsection> <refsection> <title>See also</title> diff --git a/help/en_US/periodogram.xml b/help/en_US/periodogram.xml index 5ad8738..5566e39 100644 --- a/help/en_US/periodogram.xml +++ b/help/en_US/periodogram.xml @@ -24,9 +24,7 @@ <refsynopsisdiv> <title>Calling Sequence</title> <synopsis> - [PXX, W] = periodogram (X) - [PXX, W] = periodogram (X, WIN) - [PXX, W] = periodogram (X, WIN, NFFT) + [PXX, W] = periodogram (X, WIN, NFFT, FS) [PXX, W] = periodogram (..., "RANGE") </synopsis> @@ -56,8 +54,30 @@ The optional second output W are the normalized angular frequencies. For a one- <para> If a sampling frequency is specified, FS, then the output frequencies F will be in the range [0, FS/2] or [0, FS/2) for one-sided calculations. For two-sided calculations the range will be [0, FS). </para> - <para> -When called with no outputs the periodogram is immediately plotted in the current figure window. -</para> + +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +n=0:319; +x=cos(%pi/4*n)+rand(size(n,"r"),"normal"); +[pxx,w]=periodogram(x,ones(1,320),256,2000,"onesided"); +plot2d(w,10*log10(pxx)) +xtitle('periodogram','frequency','magnitude(db)') +xgrid() + ]]></programlisting> +<scilab:image> +n=0:319; +x=cos(%pi/4*n)+rand(size(n,"r"),"normal"); +[pxx,w]=periodogram(x,ones(1,320),256,2000,"onesided"); +plot2d(w,10*log10(pxx)) +xtitle('periodogram','frequency','magnitude(db)') +xgrid() +</scilab:image> + + </refsection> + + </refentry> diff --git a/help/en_US/pmusic.xml b/help/en_US/pmusic.xml index d299b3a..b445409 100644 --- a/help/en_US/pmusic.xml +++ b/help/en_US/pmusic.xml @@ -17,7 +17,7 @@ <refnamediv> <refname>pmusic</refname> - <refpurpose>Psuedospectrum using MUSIC algorithm</refpurpose> + <refpurpose>Computes Psuedospectrum using MUSIC algorithm</refpurpose> </refnamediv> @@ -33,57 +33,132 @@ [S,f] = pmusic(x,p,nfft,fs,nwin,noverlap) [...] = pmusic(...,freqrange) [...,v,e] = pmusic(...) - - Parameters: - x - int|double - vector|matrix - Input signal. In case of a matrix, each row of x represents a + + + + + + </synopsis> +</refsynopsisdiv> + + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>x:</term> + <listitem><para> int|double - vector|matrix</para> +<para>Input signal. In case of a matrix, each row of x represents a seperate observation of the signal. If 'corr' flag is specified, then x is the correlation matrix. If w is not specified in the input, it is determined by the algorithm. If x is real valued, then range of w is [0, pi]. - Otherwise, the range of w is [0, 2pi) - p - int|double - scalar|vector - p(1) is the dimension of the signal subspace + Otherwise, the range of w is [0, 2pi)</para> +</listitem></varlistentry> + </variablelist> + +<variablelist> + <varlistentry><term>p:</term> + <listitem><para> int|double - scalar|vector</para> +<para>p(1) is the dimension of the signal subspace p(2), if specified, represents a threshold that is multiplied by - the smallest estimated eigenvalue of the signal's correlation matrix. - w - int|double - vector - w is the vector of normalized frequencies over which the - pseuspectrogram is to be computed. - nfft - int - scalar (Default = 256) - Length of the fft used to compute pseudospectrum. The length of S + the smallest estimated eigenvalue of the signal's correlation matrix.</para> + +</listitem></varlistentry> + </variablelist> + +<variablelist> +<varlistentry><term>w:</term> + <listitem><para> int|double - vector</para> +<para>w is the vector of normalized frequencies over which the + pseuspectrogram is to be computed.</para> + +</listitem></varlistentry> + +</variablelist> + + +<variablelist> +<varlistentry><term>nfft:</term> + <listitem><para> int - scalar (Default = 256)</para> +<para>Length of the fft used to compute pseudospectrum. The length of S (and hence w/f) depends on the type of values in x and nfft. If x is real, length of s is (nfft/2 + 1) {Range of w = [0, pi]} if nfft is even and (nfft+1)/2 {Range of w = [0, pi)} otherwise. - If x is complex, length of s is nfft. - fs - int|double - scalar (Default = 1) - Sampling rate. Used to convert the normalized frequencies (w) to - actual values (f) and vice-versa. - nwin - int|double - scalar (int only)|vector (Default = 2*p(1)) - If nwin is scalar, it is the length of the rectangular window. + If x is complex, length of s is nfft.</para> + +</listitem></varlistentry> + +</variablelist> + +<variablelist> +<varlistentry><term>fs:</term> + <listitem><para> int|double - scalar (Default = 1)</para> +<para>Sampling rate. Used to convert the normalized frequencies (w) to + actual values (f) and vice-versa.</para> + +</listitem></varlistentry> + +</variablelist> + +<variablelist> +<varlistentry><term>nwin:</term> + <listitem><para> int|double - scalar (int only)|vector (Default = 2*p(1))</para> +<para> If nwin is scalar, it is the length of the rectangular window. Otherwise, the vector input is considered as the window coefficients. - Not used if 'corr' flag present. - If x is a vector, windowing not done in nwin in scalar. If x is a - matrix, - noverlap - int - scalar (Default = nwin-1) - number of points by which successive windows overlap. noverlap not - used if x is a matrix - freqrange - string - The range of frequencies over which the pseudospetrogram is + Not used if 'corr' flag present.</para> + +</listitem></varlistentry> + +</variablelist> +<variablelist> +<varlistentry><term>noverlap:</term> + <listitem><para> int - scalar (Default = nwin-1)</para> +<para> number of points by which successive windows overlap. noverlap not + used if x is a matrix</para> + +</listitem></varlistentry> + +</variablelist> +<variablelist> +<varlistentry><term>freqrange:</term> + <listitem><para> string</para> +<para>The range of frequencies over which the pseudospetrogram is computed. Three possible values - 'onesided', 'twosided', 'centered' 'corr' flag Presence indicates that the primary input x is actually a correlation matrix - - Examples: - TODO: - - </synopsis> -</refsynopsisdiv> + </para> + +</listitem></varlistentry> + +</variablelist> +</refsection> + +<refsection> + <title>Description</title> +<para>[S,w] = pmusic(x,p) implements the MUSIC (Multiple Signal Classification) algorithm and returns S, the pseudospectrum estimate of the input signal x, and a vector w of normalized frequencies (in rad/sample) at which the pseudospectrum is evaluated. The pseudospectrum is calculated using estimates of the eigenvectors of a correlation matrix associated with the input data x, where x is specified as either:</para> + + <para> A row or column vector representing one observation of the signal + + </para> +<para>A rectangular array for which each row of x represents a separate observation of the signal (for example, each row is one output of an array of sensors, as in array processing), such that x'*x is an estimate of the correlation matrix</para> +</refsection> + + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + n = 0:199; + x = cos(0.257*%pi*n) + sin(0.2*%pi*n) ; + [S,w]=pmusic(x,2,16,1) + ]]></programlisting> +</refsection> + <refsection> <title>See also</title> <simplelist type="inline"> - <member><link linkend="pburg">| peig | periodogram | pmtm | prony | pwelch | rooteig | rootmusic</link></member> + <member><link linkend="pburg">pburg| peig | periodogram | pmtm | prony | pwelch | rooteig | rootmusic</link></member> </simplelist> </refsection> diff --git a/help/en_US/poly2lsf.xml b/help/en_US/poly2lsf.xml index 27ca6a2..e3cc732 100644 --- a/help/en_US/poly2lsf.xml +++ b/help/en_US/poly2lsf.xml @@ -17,7 +17,45 @@ <refnamediv> <refname>poly2lsf</refname> - <refpurpose></refpurpose> + <refpurpose>Calculates the line spectral frequencies for the given prediction polynomial</refpurpose> </refnamediv> + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + lsf = poly2lsf(a) +poly2lsf maps Prediction polynomial coefficients to line spectral frequencies. + + </synopsis> +</refsynopsisdiv> +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>a:</term> + <listitem><para> Coefficients of prediction polynomial(the roots of the polynomial has to be inside the unity circle)</para></listitem></varlistentry> + </variablelist> +<variablelist> + <varlistentry><term>lsf:</term> + <listitem><para> Line spectral frequencies</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Example</title> + <programlisting role="example"><![CDATA[ +X=[1 0.6149 0.9899 0 0.0031 -0.0082] +lsf = poly2lsf(X) +//EXPECTED OUTPUT: +//lsf =0.7841731 1.5605415 1.8776459 1.8984313 2.3592523 + ]]></programlisting> +</refsection> + +<refsection> + <title>Authors</title> + <simplelist type="vert"> + <member>Jitnder Singh</member> + </simplelist> +</refsection> + </refentry> diff --git a/help/en_US/polyreduce.xml b/help/en_US/polyreduce.xml new file mode 100644 index 0000000..13e759a --- /dev/null +++ b/help/en_US/polyreduce.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from polyreduce.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="polyreduce" xml:lang="en" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:ns3="http://www.w3.org/1999/xhtml" + xmlns:mml="http://www.w3.org/1998/Math/MathML" + xmlns:scilab="http://www.scilab.org" + xmlns:db="http://docbook.org/ns/docbook"> + + <refnamediv> + <refname>polyreduce</refname> + <refpurpose></refpurpose> + </refnamediv> + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + p= polyreduce (c) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>c:</term> + <listitem><para>polynomial coefficients vector.</para></listitem></varlistentry> + <varlistentry><term>p:</term> + <listitem><para>Reduced polynomial coefficients.</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +Reduce a polynomial coefficient vector to a minimum number of terms by +stripping off any leading zeros. This function is used in residue(). + +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +polyreduce ([0, 0, 1, 2, 3]) +//Output: [1, 2, 3] + ]]></programlisting> +</refsection> + + +</refentry> diff --git a/help/en_US/polyscale.xml b/help/en_US/polyscale.xml index f689e36..cc62663 100644 --- a/help/en_US/polyscale.xml +++ b/help/en_US/polyscale.xml @@ -17,7 +17,77 @@ <refnamediv> <refname>polyscale</refname> - <refpurpose>errcheck1</refpurpose> + <refpurpose> scales the roots of a polynomial in the z plane</refpurpose> </refnamediv> + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + b = polyscale(a,alpha) + + </synopsis> +</refsynopsisdiv> + +<refsection> +<title>Description</title> +<para> +b = polyscale(a,alpha) scales the roots of a polynomial in the z-plane, where a is a vector containing the polynomial coefficients and alpha is the scaling factor. +</para> +<para> +If alpha is a real value in the range [0 1], then the roots of a are radially scaled toward the origin in the z-plane. Complex values for alpha allow arbitrary changes to the root locations. +</para> + + +</refsection> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>a:</term> + <listitem><para> vector containing the polynomial coefficients</para></listitem></varlistentry> + </variablelist> +<variablelist> + <varlistentry><term>alpha:</term> + <listitem><para> the scaling vector</para></listitem></varlistentry> + </variablelist> +<variablelist> +<varlistentry><term>b:</term> + <listitem><para>vector of scaled roots. </para></listitem></varlistentry> + </variablelist> +</refsection> + + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +p=[1 0 0 0 0 0 0 -1] +b=polyscale(p,0.95) +//EXPECTED OUTPUT:b=1. 0. 0. 0. 0. 0. 0. - 0.6983373 + + + ]]></programlisting> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +t +p=[1 0 0 0 0 0 0 -1] +b=polyscale(p,0.85) +//EXPECTED OUTPUT:b=1. 0. 0. 0. 0. 0. 0. - 0.3205771 + + + ]]></programlisting> +</refsection> + +<refsection> +<title>Author</title> +<simplelist type="vert"> + <member>Debdeep Dey</member> + </simplelist> +</refsection> + + + </refentry> diff --git a/help/en_US/polyval.xml b/help/en_US/polyval.xml index f041227..8150805 100644 --- a/help/en_US/polyval.xml +++ b/help/en_US/polyval.xml @@ -17,7 +17,54 @@ <refnamediv> <refname>polyval</refname> - <refpurpose></refpurpose> + <refpurpose>returns the value of a polynomial of degree n evaluated at x. y = polyval(p,x,[],mu) or [y,delta] = polyval(p,x,S,mu) use x^=(x−μ1)/μ2 in place of x. +In this equation, μ1=mean(x)and μ2=std(x). The centering and scaling parameters mu = [μ1,μ2] is optional </refpurpose> </refnamediv> + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + y= polyval(p,x) + [y,delta] = polyval(p,x,S) + </synopsis> +</refsynopsisdiv> + + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>p:</term> + <listitem><para> vector of length n+1 whose elements are the coefficients in descending powers of the polynomial to be evaluated.</para></listitem></varlistentry> + </variablelist> +<variablelist> + <varlistentry><term>x:</term> + <listitem><para> -can be a matrix or a vector. In either case, polyval evaluates p at each element of x.</para></listitem></varlistentry> + </variablelist> +<variablelist> +<varlistentry><term>delta:</term> + <listitem><para>-is an estimate of the standard deviation of the error in predicting a future observation at x by p(x). </para></listitem></varlistentry> + </variablelist> +</refsection> + + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +p = [3 2 1]; +y=polyval(p,[5 7 9]) +//EXPECTED OUTPUT: +//y= 86 162 262 + + + ]]></programlisting> +</refsection> + + + + + + + + </refentry> diff --git a/help/en_US/prepad.xml b/help/en_US/prepad.xml new file mode 100644 index 0000000..81797e0 --- /dev/null +++ b/help/en_US/prepad.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from prepad.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="prepad" xml:lang="en" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:ns3="http://www.w3.org/1999/xhtml" + xmlns:mml="http://www.w3.org/1998/Math/MathML" + xmlns:scilab="http://www.scilab.org" + xmlns:db="http://docbook.org/ns/docbook"> + + <refnamediv> + <refname>prepad</refname> + <refpurpose></refpurpose> + </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + y= prepad (x, l) + y= prepad (x, l, c) + y= prepad (x, l, c, dim) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>x:</term> + <listitem><para>Input vector or matrix of real numbers.</para></listitem></varlistentry> + <varlistentry><term>l:</term> + <listitem><para> The length of the final prepadded sequence.</para></listitem></varlistentry> + <varlistentry><term>c:</term> + <listitem><para>number used for prepadding.</para></listitem></varlistentry> + <varlistentry><term>dim:</term> + <listitem><para>The dimension along which the prepadding should happen.</para></listitem></varlistentry> + <varlistentry><term>y:</term> + <listitem><para>Output</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +Prepend the scalar value c to the vector x until it is of length + l. If c is not given, a value of 0 is used. + + If length (x) > l, elements from the beginning of x + are removed until a vector of length l is obtained. + + If x is a matrix, elements are prepended or removed from each row. + + If the optional argument dim is given, operate along this dimension. + + If dim is larger than the dimensions of x, the result will have + dim dimensions. + +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +prepad ([1,2], 4,0,2) +//Output: [0,0,1,2] + ]]></programlisting> +</refsection> +</refentry> diff --git a/help/en_US/prony.xml b/help/en_US/prony.xml index 25734a1..42ca98a 100644 --- a/help/en_US/prony.xml +++ b/help/en_US/prony.xml @@ -17,7 +17,67 @@ <refnamediv> <refname>prony</refname> - <refpurpose></refpurpose> + <refpurpose>Prony's method for time-domain design of IIR Filters</refpurpose> </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [b,a] = prony(h,nb,na) + + </synopsis> +</refsynopsisdiv> + +<refsection> +<title>Description</title> +<para> +The system function has numerator order,nb and denominator order,na. The lengths of Num and Den are num_ord+1 and denom_ord+1. If the length of impulse_resp is less than the largest order (num_ord or denom_ord), impulse_resp is padded with zeros. +</para> + + + +</refsection> + + + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>b:</term> + <listitem><para> coefficients of the numerator of the TF</para></listitem></varlistentry> + </variablelist> +<variablelist> + <varlistentry><term>a:</term> + <listitem><para> coefficients of the denominator of the TF</para></listitem></varlistentry> + </variablelist> +<variablelist> +<varlistentry><term>h:</term> + <listitem><para>impulse response of the digital filter </para></listitem></varlistentry> + </variablelist> +<variablelist> +<varlistentry><term>nb:</term> + <listitem><para>number of zeros(order of numerator) </para></listitem></varlistentry> + </variablelist> + +<variablelist> +<varlistentry><term>na:</term> + <listitem><para>number of poles(order of denominator) </para></listitem></varlistentry> + </variablelist> + +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +V=filter([1,1],[1,1,2],[1 zeros(1,31)]); +[b,a]=prony(V,1,2) + +//OUTPUT:a = 1. 1. 2.//denominator coefficients + //b = 1. 1. //numerator coefficients + + ]]></programlisting> +</refsection> + + + </refentry> diff --git a/help/en_US/rc2ac.xml b/help/en_US/rc2ac.xml index acfe121..1462720 100644 --- a/help/en_US/rc2ac.xml +++ b/help/en_US/rc2ac.xml @@ -27,4 +27,45 @@ a = rc2ac(k, R0) </synopsis> </refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>k:</term> + <listitem><para>Lattice form reflection coefficients.</para></listitem></varlistentry> + <varlistentry><term>r0:</term> + <listitem><para> Initial zero lag autocorrelation.</para></listitem></varlistentry> + <varlistentry><term>a:</term> + <listitem><para>Autocorrelation coefficients.</para></listitem></varlistentry> + + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +Uses rlevinson to function convert reflection coefficients to autocorrelation sequence. +</para> +<para> +r = rc2ac(k,r0) finds the autocorrelation coefficients, r, of the output of the discrete-time prediction error filter from the lattice-form reflection coefficients k and initial zero-lag autocorrelation r0 +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +k = [0.3090 0.9800 0.0031 0.0082 -0.0082]; +r0 = 0.1; +R=rc2ac(k,r0) +//Output: +//R = +// 0.1 +// - 0.0309 +// - 0.0790948 +// 0.0786627 +// 0.0293629 +// - 0.0950000 + + ]]></programlisting> +</refsection> </refentry> diff --git a/help/en_US/rc2poly.xml b/help/en_US/rc2poly.xml index f8c66a4..a2f2993 100644 --- a/help/en_US/rc2poly.xml +++ b/help/en_US/rc2poly.xml @@ -3,7 +3,11 @@ <!-- * * This help file was generated from rc2poly.sci using help_from_sci(). - * + *kr: Refelection coefficient. +// R0: the zero lag autocorrelation, R0. +// a: Return the prediction polynomial. +// efinal: Return the final prediction error. + --> <refentry version="5.0-subset Scilab" xml:id="rc2poly" xml:lang="en" @@ -17,7 +21,7 @@ <refnamediv> <refname>rc2poly</refname> - <refpurpose></refpurpose> + <refpurpose>Convert reflection coefficients to prediction filter polynomial</refpurpose> </refnamediv> @@ -28,4 +32,42 @@ [a, efinal] = rc2poly(kr,R0) </synopsis> </refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>kr:</term> + <listitem><para>Reflection coefficients.</para></listitem></varlistentry> + <varlistentry><term>R0:</term> + <listitem><para>The zero-lag autocorrelation.</para></listitem></varlistentry> + <varlistentry><term>a:</term> + <listitem><para>Prediciton polynomial.</para></listitem></varlistentry> + +<varlistentry><term>efinal:</term> + <listitem><para>the final prediction error.</para></listitem></varlistentry> +</variablelist> +</refsection> + +<refsection> +<title>Description</title> +<para>a = rc2poly(k) converts the reflection coefficients k corresponding to the lattice structure to the prediction filter polynomial a, with a(1) = 1.</para> +<para>The output a is row vector of length length(k) + 1.</para> + +<para>[a,efinal] = rc2poly(k,r0) returns the final prediction error efinal based on the zero-lag autocorrelation, r0.</para> +</refsection> + + +<refsection> +<title>Example</title> + <programlisting role="example"><![CDATA[ +k = [0.3090 0.9800 0.0031 0.0082 -0.0082]; +a = rc2poly(k) +//EXPECTED OUTPUT:a= 1. 0.6148162 0.9898814 0.0000243 0.0031580 - 0.0082 + ]]></programlisting> + + +</refsection> + + + </refentry> diff --git a/help/en_US/rcosdesign.xml b/help/en_US/rcosdesign.xml index e586d0d..397be44 100644 --- a/help/en_US/rcosdesign.xml +++ b/help/en_US/rcosdesign.xml @@ -17,7 +17,66 @@ <refnamediv> <refname>rcosdesign</refname> - <refpurpose>RCOSDESIGN computes the raised cosine FIR filter</refpurpose> + <refpurpose><para>RCOSDESIGN computes the raised cosine FIR filter.</para> +<para>The output result for the input parameter of shape 'normal' is not equivalent to the matlab output because of the use of sinc function in the computation. Matlab and scilab sinc functions seem to not be equivalent. +</para> +</refpurpose> </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + h = rcosdesign(rollof_factor, num_of_symb, samp_per_symb, varargin) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>rollof_factor:</term> + <listitem><para> roll-off factor of the designed filter</para></listitem></varlistentry> + </variablelist> + + + <variablelist> + <varlistentry><term>num_of_symb:</term> + <listitem><para>filter truncated to these many number of symbols</para></listitem></varlistentry> + </variablelist> + + + <variablelist> + <varlistentry><term>samp_of_symb:</term> + <listitem><para> each symbol represented by these many samples</para></listitem></varlistentry> + </variablelist> + + + + <variablelist> + <varlistentry><term>shape:</term> + <listitem><para> returns a normal raised-cosine FIR filter when set to 'normal'.</para> +<para>returns a square-root raised cosing filter when set to 'sqrt'.</para></listitem></varlistentry> + </variablelist> + + + <variablelist> + <varlistentry><term>h:</term> + <listitem><para> returned filter coefficients</para></listitem></varlistentry> + </variablelist> + +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +rolloff = 0.25; +span = 3; +sample per symbol=sps=2; +b=rcosdesign(rolloff,span,sps); +//OUTPUT: +//b=- 0.1210006 - 0.0456421 0.4418023 0.7590604 0.4418023 - 0.0456421 - 0.1210006 + ]]></programlisting> +</refsection> + </refentry> diff --git a/help/en_US/resample.xml b/help/en_US/resample.xml index aab50da..809b4ff 100644 --- a/help/en_US/resample.xml +++ b/help/en_US/resample.xml @@ -48,7 +48,7 @@ <title>Description</title> <para> This is an Octave function. -This function resamples in the input sequence x supplied by a factor of p/q. If x is a matrix, then every column is resampled.hange the sample rate of x by a factor of p/q. +This function resamples in the input sequence x supplied by a factor of p/q. If x is a matrix, then every column is resampled changing the sample rate of x by a factor of p/q. This is performed using a polyphase algorithm. The impulse response h, given as parameter 4, of the antialiasing filter is either specified or designed with a Kaiser-windowed sinecard. </para> </refsection> diff --git a/help/en_US/residue.xml b/help/en_US/residue.xml new file mode 100644 index 0000000..0d969a8 --- /dev/null +++ b/help/en_US/residue.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from residue.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="residue" xml:lang="en" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:ns3="http://www.w3.org/1999/xhtml" + xmlns:mml="http://www.w3.org/1998/Math/MathML" + xmlns:scilab="http://www.scilab.org" + xmlns:db="http://docbook.org/ns/docbook"> + + <refnamediv> + <refname>residue</refname> + <refpurpose></refpurpose> + </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [r, p, k, e] = residue (b, a) + [b, a] = residue (r, p, k) + [b, a] = residue (r, p, k, e) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>b:</term> + <listitem><para> Real or complex valued vector or matrix</para></listitem></varlistentry> + <varlistentry><term>a:</term> + <listitem><para> Real or complex valued vector or matrix</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +The first calling form computes the partial fraction expansion for the quotient of the polynomials, b and a. +This function works for transfer functions which are proper fractions. +NOTE that the polynomials 'b' and 'a' should have real coefficients(because of the function 'filter' used in polyval) +</para> +<para>The second and the third calling forms perform the inverse operation of the first calling form.</para> +<para> +<latex> +\begin{eqnarray} +\frac{B(s)}{A(s)}=\sum_{m=1}^{M}\frac{r(m)}{(s-p(m))^{e(m)}}+\sum_{i=1}^{N}k(i)*{s^{N-i}} +\end{eqnarray} +</latex> +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +1. +b = [1, 1, 1]; +a = [1, -5, 8, -4]; + [r, p, k, e] = residue (b, a) +// result r = [-2; 7; 3] +// result p = [2; 2; 1] +// result k = [](0x0) +// result e = [1; 2; 1] + ]]></programlisting> +</refsection> +</refentry> diff --git a/help/en_US/residued.xml b/help/en_US/residued.xml index 8bdecc5..1aa9f3c 100644 --- a/help/en_US/residued.xml +++ b/help/en_US/residued.xml @@ -41,19 +41,35 @@ <refsection> <title>Description</title> <para> -This is an Octave function. -Similar to the "residuez" function. The difference being in the function "residuez", the IIR part (poles p and residues r) is driven in parallel with the FIR part(f) whereas in the function "residued", the IIR part is driven by the output of the FIR part. In signal modeling applications, this structure can be more accurate. +Similar to the "residuez" function. The difference being in the function "residuez", the IIR part (poles p and residues r) is driven in parallel with the FIR part(f) whereas in the function "residued", the IIR part is driven by the output of the FIR part. In signal modeling applications, this structure can be more accurate.NOTE that the polynomials 'b' and 'a' should have real coefficients(because of the function 'filter' used in polyval). This function works for transfer functions which are proper fractions. +</para> +<para> +<latex> +\begin{eqnarray} +\frac{B(s)}{A(s)}=\sum_{m=1}^{M}\frac{r(m)}{(s-p(m))^{e(m)}}+\sum_{i=1}^{N}k(i)*{s^{N-i}} +\end{eqnarray} +</latex> </para> </refsection> <refsection> <title>Examples</title> <programlisting role="example"><![CDATA[ -1. [a,b,c,d]=residued([1 i;3 -4],[1 2; 3 4]) -a = [ 0.19405 - 1.31377i; 0.08329 + 0.99163i; -0.27734 + 0.32215i] -b = [ -0.10184 - 1.19167i; -0.10184 + 1.19167i; -2.79632 - 0.00000i] -c = 1 -d = [ 1 ; 1 ; 1] +1. +B=[1 1 ]; A=[1 -2 1]; + [r,p,f,m] = residued(B,A) +//OUTPUT +//r = +// -1 +// 2 +//p = +// 1 +// 1 +// +//f = [](0x0) +//e = +// 1 +// 2 ]]></programlisting> </refsection> </refentry> diff --git a/help/en_US/residuez.xml b/help/en_US/residuez.xml index 4655c59..b004fea 100644 --- a/help/en_US/residuez.xml +++ b/help/en_US/residuez.xml @@ -41,19 +41,28 @@ <refsection> <title>Description</title> <para> -This is an Octave function -It compute the PFE of filter H(z)= B(z)/A(z) where inputs b and a are vectors specifying the digital filter. +It computes the partial fraction expansion of filter H(z)= B(z)/A(z) where inputs b and a are vectors specifying the digital filter.NOTE that the polynomials 'b' and 'a' should have real coefficients(because of the function 'filter' used in polyval). This function works for transfer functions which are proper fractions. </para> +<para> +<latex> +\begin{eqnarray} +H(z)=\frac{r(1)}{[1-\frac{p(1)}{z}]^{m(1)}}+..........+\frac{r(N)}{[1-\frac{p(N)}{z}]^{m(N)}} +\end{eqnarray} +</latex> +</para> + </refsection> <refsection> <title>Examples</title> <programlisting role="example"><![CDATA[ -1. [a,b,c,d]=residuez([i 2i 3i; -4 1 4i],[1 2 3]) -a = [0.6262 - 1.4412i; -0.4039 + 1.4658i] -b = [-1.0000 - 1.4142i; -1.0000 + 1.4142i] -c = [-0.22222 - 0.97531i 0.33333 + 0.51852i 0.00000 - 0.11111i; 0.00000 - 1.33333i] -d = 1 +1.B=[1 1 1]; A=[1 -2 1]; + [r,p,f,m] = residuez(B,A) + //OUTPUT: + //r=[0;3] + //p=[1;1] + //f=1 + //e=[1;2] ]]></programlisting> </refsection> </refentry> diff --git a/help/en_US/rlevinson.xml b/help/en_US/rlevinson.xml index 799fcb1..5017af8 100644 --- a/help/en_US/rlevinson.xml +++ b/help/en_US/rlevinson.xml @@ -17,17 +17,116 @@ <refnamediv> <refname>rlevinson</refname> - <refpurpose></refpurpose> + <refpurpose>This function computes the autocorrelation coefficients using prediction polynomial method.</refpurpose> </refnamediv> <refsynopsisdiv> <title>Calling Sequence</title> <synopsis> - a = rlevinson(a, efinal) - [a, U] = rlevinson(a, efinal) - [a, U, kr] = rlevinson(a, efinal) - [a, U, kr, e] = rlevinson(a, efinal) + R = rlevinson(a, efinal) + [R, U] = rlevinson(a, efinal) + [R, U, kr] = rlevinson(a, efinal) + [R, U, kr, e] = rlevinson(a, efinal) </synopsis> </refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>a:</term> + <listitem><para>Input argument ,prediction polynomial coefficients.</para></listitem></varlistentry> + <varlistentry><term>efinal:</term> + <listitem><para>Input argument, final prediction error.</para></listitem></varlistentry> + <varlistentry><term>R:</term> + <listitem><para>Returns the auto-correlation coefficients.</para></listitem></varlistentry> + +<varlistentry><term>U:</term> + <listitem><para>Returns upper triangular matrix of order length(a)*length(a).</para></listitem></varlistentry> + <varlistentry><term>kr:</term> + <listitem><para>Reflection coefficients.</para></listitem></varlistentry> + +<varlistentry><term>e:</term> + <listitem><para>Prediction error.</para></listitem></varlistentry> + </variablelist> + +</refsection> + +<refsection> + <title>Description + </title> +<para>The reverse Levinson-Durbin recursion implements the step-down algorithm for solving the following symmetric Toeplitz system of linear equations for r, where r = [r(1) … r(p + 1)] and r(i)* denotes the complex conjugate of r(i).</para> +<para> +<latex> +\begin{eqnarray} +\begin{bmatrix} + r(1) r(2)* - - r(p)* \\ + r(2) r(1) - - r(p-1)* \\ + - - - - - \\ + - - - - - \\ + - - - - - \\ + r(p) r(p-1) - r(2) r(1) +\end{bmatrix}\begin{bmatrix} +a(2)\\ +a(3)\\ +.\\ +.\\ +.\\ +a(p+1) +\end{bmatrix}=\begin{bmatrix} +-r(2)\\ +-r(3)\\ +.\\ +.\\ +.\\ +-r(p+1) +\end{bmatrix} +\end{eqnarray} + +</latex> +</para> + +<para> +Input vector a represents the polynomial coefficients of this prediction error filter in descending powers of z. +<para> +<latex> +\begin{eqnarray} +A(z)=1+a(2)^{z-1}+.............+a(n+1)^{z-p} +\end{eqnarray} +</latex></para> +</para> +<para>[r,u] = rlevinson(a,efinal) returns upper triangular matrix U from the UDU* decomposition + +</para> +<latex> +\begin{eqnarray} +R^{-1}=UE^{-1}U* +\end{eqnarray} +</latex> +<para> +<latex> + +</latex> +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +X=[1 6/7 5/7 8/7 3/7 6/7]; +[R U kr e] = rlevinson(X, 0.3) + ]]></programlisting> +</refsection> + +<refsection> + <title>See also</title> + <simplelist type="inline"> + <member><link linkend="levinson">abs</link></member> + <member><link linkend="levdown">mean</link></member> + + </simplelist> +</refsection> + + + </refentry> diff --git a/help/en_US/rooteig.xml b/help/en_US/rooteig.xml index 9b2abe2..b8ad409 100644 --- a/help/en_US/rooteig.xml +++ b/help/en_US/rooteig.xml @@ -24,26 +24,86 @@ <refsynopsisdiv> <title>Calling Sequence</title> <synopsis> - w = rooteig(x,p) [w,pow] = rooteig(x,p) - [f,pow] = rooteig(...,fs) + [w,pow] = rooteig(...,fs) [w,pow] = rooteig(...,'corr') - + </synopsis> </refsynopsisdiv> <refsection> <title>Parameters</title> <variablelist> - <varlistentry><term>Examples:</term> - <listitem><para> </para></listitem></varlistentry> - <varlistentry><term>1) 3 complex exponentials:</term> - <listitem><para> </para></listitem></varlistentry> - <varlistentry><term>n=0:</term> - <listitem><para>99;</para></listitem></varlistentry> + <varlistentry><term>x:</term> + <listitem><para> int|double - vector|matrix</para> +<para>Input signal. In case of a matrix, each row of x represents a + seperate observation of the signal. If 'corr' flag is specified, + then x is the correlation matrix. + If w is not specified in the input, it is determined by the + algorithm. If x is real valued, then range of w is [0, pi]. + Otherwise, the range of w is [0, 2pi)</para> +</listitem></varlistentry> + </variablelist> + +<variablelist> + <varlistentry><term>p:</term> + <listitem><para> int|double - scalar|vector</para> +<para>p(1) is the dimension of the signal subspace + p(2), if specified, represents a threshold that is multiplied by + the smallest estimated eigenvalue of the signal's correlation matrix.</para> + +</listitem></varlistentry> </variablelist> + +<variablelist> +<varlistentry><term>w:</term> + <listitem><para> int|double - vector</para> +<para>w is the vector of normalized frequencies over which the + pseuspectrogram is to be computed.</para> + +</listitem></varlistentry> + +</variablelist> + + + + +<variablelist> +<varlistentry><term>fs:</term> + <listitem><para> int|double - scalar (Default = 1)</para> +<para>Sampling rate. Used to convert the normalized frequencies (w) to + actual values (f) and vice-versa.</para> + +</listitem></varlistentry> + +</variablelist> + + </refsection> + + + + + + +<refsection> +<title>Description</title> +[w,pow] = rooteig(x,p) estimates the frequency content in the time samples of a signal x, and returns w, a vector of frequencies in rad/sample, and the corresponding signal power in the vector pow in units of power, such as volts^2. The input signal x is specified either as: + <para> A row or column vector representing one observation of the signal + + </para> +<para>A rectangular array for which each row of x represents a separate observation of the signal (for example, each row is one output of an array of sensors, as in array processing), such that x'*x is an estimate of the correlation matrix</para> +</refsection> +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + n=0:99; + s=exp(1*%i*%pi/2*n)+2*exp(1*%i*%pi/4*n)+exp(1*%i*%pi/3*n)+rand(1,100,"normal"); + X = corrmtx(s,12,'mod'); + [W,P] = rooteig(X,3); + ]]></programlisting> +</refsection> <refsection> <title>See also</title> <simplelist type="inline"> diff --git a/help/en_US/rootmusic.xml b/help/en_US/rootmusic.xml index 82178e1..19aa883 100644 --- a/help/en_US/rootmusic.xml +++ b/help/en_US/rootmusic.xml @@ -28,20 +28,94 @@ [w,pow] = rootmusic(x,p) [f,pow] = rootmusc(...,fs) [w,pow] = rootmusic(...,'corr') - + </synopsis> </refsynopsisdiv> <refsection> <title>Parameters</title> <variablelist> - <varlistentry><term>Examples:</term> - <listitem><para> </para></listitem></varlistentry> - <varlistentry><term>1) 3 complex exponentials:</term> - <listitem><para> </para></listitem></varlistentry> - <varlistentry><term>n=0:</term> - <listitem><para>99;</para></listitem></varlistentry> + <varlistentry><term>x:</term> + <listitem><para> int|double - vector|matrix</para> +<para>Input signal. In case of a matrix, each row of x represents a + seperate observation of the signal. If 'corr' flag is specified, + then x is the correlation matrix. + If w is not specified in the input, it is determined by the + algorithm. If x is real valued, then range of w is [0, pi]. + Otherwise, the range of w is [0, 2pi)</para> +</listitem></varlistentry> + </variablelist> + +<variablelist> + <varlistentry><term>p:</term> + <listitem><para> int|double - scalar|vector</para> +<para>p(1) is the dimension of the signal subspace + p(2), if specified, represents a threshold that is multiplied by + the smallest estimated eigenvalue of the signal's correlation matrix.</para> + +</listitem></varlistentry> </variablelist> + +<variablelist> +<varlistentry><term>w:</term> + <listitem><para> int|double - vector</para> +<para>w is the vector of normalized frequencies over which the + pseuspectrogram is to be computed.</para> + +</listitem></varlistentry> + +</variablelist> + + +<variablelist> +<varlistentry><term>pow:</term> + <listitem><para> the estimated absolute value squared amplitudes of the sinusoids at the frequencies w.</para> + +</listitem></varlistentry> + +</variablelist> + +<variablelist> +<varlistentry><term>fs:</term> + <listitem><para> int|double - scalar (Default = 1)</para> +<para>Sampling rate. Used to convert the normalized frequencies (w) to + actual values (f) and vice-versa.</para> + +</listitem></varlistentry> + +</variablelist> + + +<variablelist> +<varlistentry><term>corr:</term> + <listitem><para> If specified, x is interpreted as a correlation matrix rather than a matrix of the signal data. For x to be a correlation matrix, x must be a square matrix and all its eigenvalues must be nonnegative.</para> + +</listitem></varlistentry> + +</variablelist> +</refsection> + +<refsection> + <title>Description</title> +<para>W = rootmusic(X,P) returns the frequencies in radians/sample for the P complex exponentials (sinusoids) that make up the signal X. + +The input X is specified either as:</para> + + <para> A row or column vector representing one observation of the signal + + </para> +<para>A rectangular array for which each row of x represents a separate observation of the signal (for example, each row is one output of an array of sensors, as in array processing), such that x'*x is an estimate of the correlation matrix</para> +</refsection> + + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +n=0:99; +s=exp(1*%i*%pi/2*n)+2*exp(1*%i*%pi/4*n)+exp(1*%i*%pi/3*n)+rand(1,100,"normal"); +[A,R]=corrmtx(s,12,'mod'); +[W,P] = rootmusic(R,3,'corr'); + ]]></programlisting> </refsection> <refsection> diff --git a/help/en_US/sampled2continuous.xml b/help/en_US/sampled2continuous.xml index a08d04a..8d3d2df 100644 --- a/help/en_US/sampled2continuous.xml +++ b/help/en_US/sampled2continuous.xml @@ -31,20 +31,18 @@ <refsection> <title>Parameters</title> <variablelist> - <varlistentry><term>n:</term> - <listitem><para> </para></listitem></varlistentry> + <varlistentry><term>xn:</term> + <listitem><para> sampled signal</para></listitem></varlistentry> <varlistentry><term>s:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para> sampling rate</para></listitem></varlistentry> <varlistentry><term>t:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para>all instants of time t at which we need x(t) from x[n] </para></listitem></varlistentry> </variablelist> </refsection> <refsection> <title>Description</title> - <para> -This is an Octave function. -This function calculates the output reconstructed from the samples n supplied as input, at a rate of 1/s samples per unit time. + <para>This function calculates the output reconstructed from the samples n supplied as input, at a rate of 1/s samples per unit time. The third parameter t is all the instants where output x is needed from intput n and this time is relative to x(0). </para> </refsection> @@ -53,8 +51,8 @@ The third parameter t is all the instants where output x is needed from intput n <title>Examples</title> <programlisting role="example"><![CDATA[ sampled2continuous([1,2,3],5,6) -ans = -2.4166806 +//ans = +//2.4166806 ]]></programlisting> </refsection> </refentry> diff --git a/help/en_US/schurrc.xml b/help/en_US/schurrc.xml index b269840..481430a 100644 --- a/help/en_US/schurrc.xml +++ b/help/en_US/schurrc.xml @@ -17,7 +17,52 @@ <refnamediv> <refname>schurrc</refname> - <refpurpose>narginchk(1,1,argn(2));</refpurpose> + <refpurpose>Computes reflection coefficients from auto-correlation sequence using Schrur algorithm.</refpurpose> </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + k = schurrc(r) +[k,e] = schurrc(r) + </synopsis> +</refsynopsisdiv> +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>k:</term> + <listitem><para> reflection coefficients or lattice parameters of prediction filter</para></listitem></varlistentry> + <varlistentry><term>e:</term> + <listitem><para> prediction error variance</para></listitem></varlistentry> + <varlistentry><term>r:</term> + <listitem><para>auto correltion sequence </para></listitem></varlistentry> + </variablelist> +</refsection> + + +<refsection> + <title>Description</title> + <para>k = schurrc(r) uses the Schur algorithm to compute a vector k of reflection coefficients from a vector r representing an autocorrelation sequence. k and r are the same size. The reflection coefficients represent the lattice parameters of a prediction filter for a signal with the given autocorrelation sequence, r. When r is a matrix, schurrc treats each column of r as an independent autocorrelation sequence, and produces a matrix k, the same size as r. Each column of k represents the reflection coefficients for the lattice filter for predicting the process with the corresponding autocorrelation sequence r.</para> + +<para>[k,e] = schurrc(r) also computes the scalar e, the prediction error variance. When r is a matrix, e is a column vector. The number of rows of e is the same as the number of columns of r. + +</para> +</refsection> + + + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +m=linspace(1,100); +r = xcorr(m(1:5),'unbiased'); +[k,e] = schurrc(r(5:$)) + +//EXPECTED OUTPUT +//e =1.6212406 + //k = - 0.9090909 0.2222222 0.2244898 0.2434211 + + + ]]></programlisting> +</refsection> </refentry> diff --git a/help/en_US/slewrate.xml b/help/en_US/slewrate.xml index 97afbfb..c2a9002 100644 --- a/help/en_US/slewrate.xml +++ b/help/en_US/slewrate.xml @@ -17,7 +17,52 @@ <refnamediv> <refname>slewrate</refname> - <refpurpose></refpurpose> + <refpurpose> returns the slew rate for all transitions found in the bilevel waveform</refpurpose> </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + s=slewrate(x) + s=slewrate(x, t) + s=slewrate(x, Fs) + s=slewrate(x, t, 'PercentReferenceLevels', N ) + s=slewrate(x, t, 'Tolerance', M) + s=slewrate(x, t,'StateLevels', O) + + [s lowercrossvalue uppercrossvalue lowerreference upperreference]=slewrate(x) + [s lowercrossvalue uppercrossvalue lowerreference upperreference]=slewrate(x, t) + [s lowercrossvalue uppercrossvalue lowerreference upperreference]=slewrate(x, Fs) + [s lowercrossvalue uppercrossvalue lowerreference upperreference]=slewrate(x, t, 'PercentReferenceLevels', N ) + [s lowercrossvalue uppercrossvalue lowerreference upperreference]= slewrate(x, t, 'Tolerance', M) + [s lowercrossvalue uppercrossvalue lowerreference upperreference]= slewrate(x, t,'StateLevels', O) + [s lowercrossvalue uppercrossvalue lowerreference upperreference]= slewrate(x, t,'StateLevels', O, 'fig', on or off) + + </synopsis> +</refsynopsisdiv> + + + + +<refsection> + <title>Description</title> + returns the slew rate for all transitions found in the bilevel waveform, X. The slew rate is the slope of the line connecting the 10% and 90% reference levels. The sample instants of X are the indices of the vector. To determine the transitions, slewrate estimates the state levels of the input waveform by a histogram method. slewrate identifies all regions that cross the upper-state boundary of the low state and the lower-state boundary of the high state. The low-state and high-state boundaries are expressed as the state level plus or minus a multiple of the difference between the state levels. +</refsection> + + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + x=[ones(1,25) -ones(1,25) ones(1,25) ] + t=1:length(x) + s=slewrate(x,t) + //EXPECTED OUTPUT: + //s = - 2 2 + + ]]></programlisting> +</refsection> + + + + </refentry> diff --git a/help/en_US/sos2ss.xml b/help/en_US/sos2ss.xml index 99a5812..d69c4c7 100644 --- a/help/en_US/sos2ss.xml +++ b/help/en_US/sos2ss.xml @@ -17,7 +17,86 @@ <refnamediv> <refname>sos2ss</refname> - <refpurpose>[nargout,nargin]=argn();</refpurpose> + <refpurpose>Converts Digital Filter Second order section parameters to steady state form. </refpurpose> </refnamediv> + +<refsection> +<title>Calling Sequence</title> + +[A,B,C,D] = sos2ss(sos) +[A,B,C,D] = sos2ss(sos,g) + +</refsection> +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>[A,B,C,D]:</term> + <listitem><para>Steady state parameters.</para></listitem></varlistentry> + <varlistentry><term>sos:</term> + <listitem><para> Second order sectional matrix.</para></listitem></varlistentry> + <varlistentry><term>g:</term> + <listitem><para>gain of the system.</para></listitem></varlistentry> + </variablelist> +</refsection> + + +<refsection> +<title>Description</title> +<para>sos2ss converts a second-order section representation of a digital filter to an equivalent state-space representation.</para> +<para> +[A,B,C,D] = sos2ss(sos) converts sos, a system expressed in second-order section form, to a single-input, single-output state-space representation: + +x(n+1)=Ax(n)+Bu(n), +y(n)=Cx(n)+Du(n).</para> + +<para> + + <latex> + \begin{eqnarray} + f(x,a,r) = \frac{1}{r^{-a}\Gamma(a)} \int_0^x t^{a-1} \exp\left(-rt\right) dt + \end{eqnarray} + </latex> + +</para> + + + +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +sos = [1 1 1 1 0 -1 ; + -2 3 1 1 10 1]; +[A,B,C,D] = sos2ss(sos,2); +//EXPECTED OUTPUT: +//D =- 4. +//C =42. 4. - 32. - 2. +//B =[1. 0. 0. 0. 0.]' +//A =[- 10. 0. 10. 1. ; 1. 0. 0. 0. ; 0. 1. 0. 0. ; 0. 0. 1. 0. ] + ]]></programlisting> +</refsection> + + +<refsection> + <title>Authors</title> + <simplelist type="vert"> + <member>Parthasrathi Panda</member> + </simplelist> +</refsection> + + + +<refsection> + <title>See also</title> + <simplelist type="inline"> + <member><link linkend="sos2tf">abs</link></member> + <member><link linkend="sosbreak">mean</link></member> + <member><link linkend="sos2ss">max</link></member> + + </simplelist> +</refsection> + + </refentry> diff --git a/help/en_US/sos2tf.xml b/help/en_US/sos2tf.xml index 4d4e48e..972ba79 100644 --- a/help/en_US/sos2tf.xml +++ b/help/en_US/sos2tf.xml @@ -34,9 +34,15 @@ <title>Parameters</title> <variablelist> <varlistentry><term>sos:</term> - <listitem><para> matrix of real or complex numbers</para></listitem></varlistentry> + <listitem><para> matrix of real or complex numbers</para><para>Second Order Sectional form of the system.</para></listitem></varlistentry> <varlistentry><term>g:</term> - <listitem><para> real or complex value, default value is 1</para></listitem></varlistentry> + <listitem><para> real or complex value, default value is 1</para><para>Gain of the system.</para></listitem></varlistentry> + +<varlistentry><term>B:</term> + <listitem><para>Vector of numerator coefficients.</para><para>Gain of the system.</para></listitem></varlistentry> + +<varlistentry><term>A:</term> + <listitem><para>Vector of denominator coefficients.</para><para>Gain of the system.</para></listitem></varlistentry> </variablelist> </refsection> @@ -54,10 +60,10 @@ The output is a vector. <title>Examples</title> <programlisting role="example"><![CDATA[ [a,b]=sos2tf([1,2,3,4,5,6]) -a = -1 2 3 -b = -4 5 6 +//a = +//1 2 3 +//b = +//4 5 6 ]]></programlisting> </refsection> </refentry> diff --git a/help/en_US/sosbreak.xml b/help/en_US/sosbreak.xml index 3957d94..383f449 100644 --- a/help/en_US/sosbreak.xml +++ b/help/en_US/sosbreak.xml @@ -19,5 +19,54 @@ <refname>sosbreak</refname> <refpurpose>function for breaking a polynomial in second order polynomials (and an extra linear)</refpurpose> </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [zerosort,g]=sosbreak(p) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>p:</term> + <listitem><para>-the input polynomial.</para></listitem></varlistentry> + <varlistentry><term>zerosort:</term> + <listitem><para>-the array of the broken polynomials </para></listitem></varlistentry> + <varlistentry><term>g:</term> + <listitem><para>the interger multiple obtained after breaking the polynomial</para></listitem></varlistentry> + + + +</variablelist> + +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +v=[1+4*%s+6*%s^2+4*%s^3+%s^4]; +[zerosort,g]=sosbreak(v); +//OUTPUT: +// g =1. + //zerosort = + // zerosort(1) +// 2 +// 1 + 2s + s +// zerosort(2) +// 2 +//1.0000000 + 2s + s + + ]]></programlisting> +</refsection> + + +<refsection> + <title>Authors</title> + <simplelist type="vert"> + <member>Parthasarathi Panda</member> +</simplelist> +</refsection> + </refentry> diff --git a/help/en_US/specgram.xml b/help/en_US/specgram.xml index a0215bb..d603043 100644 --- a/help/en_US/specgram.xml +++ b/help/en_US/specgram.xml @@ -17,7 +17,83 @@ <refnamediv> <refname>specgram</refname> - <refpurpose></refpurpose> - </refnamediv> + <refpurpose>Generate a spectrogram for the signal x.</refpurpose> + </refnamediv> +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [S, f, t] = specgram (x,n,fs,win,overlap) + [S, f, t] =specgram(x) + </synopsis> +</refsynopsisdiv> + + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>S:</term> + <listitem><para>is the complex output of the FFT, one row per slice.</para></listitem></varlistentry> + <varlistentry><term>f:</term> + <listitem><para>is the frequency indices corresponding to the rows of S.</para></listitem></varlistentry> + <varlistentry><term>t:</term> + <listitem><para>is the time indices corresponding to the columns of S.</para></listitem></varlistentry> + +<varlistentry><term>x:</term> + <listitem><para>the input signal.</para></listitem></varlistentry> + <varlistentry><term>n:</term> + <listitem><para>length of the overlapping segments(default,n=256).</para></listitem></varlistentry> + +<varlistentry><term>fs:</term> + <listitem><para>sampling rate of input signal (if specified).</para></listitem></varlistentry> +<varlistentry><term>win:</term> + <listitem><para>window vector,alternate window to apply rather than the default of hanning (n).</para></listitem></varlistentry> +<varlistentry><term>overlap:</term> + <listitem><para>specifies the number of samples overlap between successive segments of the input signal. The default overlap is length (window)/2.</para></listitem></varlistentry> + + +</variablelist> + +</refsection> + + +<refsection> + <title>Description + </title> +<para>Generates a spectrogram for the signal x. The signal is chopped into overlapping segments of length n, and each segment is windowed and transformed into the frequency domain using the FFT. The default segment size is 256. If fs is given, it specifies the sampling rate of the input signal. The argument window specifies an alternate window to apply rather than the default of hanning (n). The argument overlap specifies the number of samples overlap between successive segments of the input signal. The default overlap is length (window)/2. +</para> + +</refsection> + + + + + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +N=1024; +n=0:N-1; +w=2*%pi/5; +x=sin(w*n)+10*sin(2*w*n); +[s,f,t]=specgram(x); +//grayplot(f,t,s) +//xlabel("frequency") +//ylabel("time") + ]]></programlisting> +<scilab:image> +N=1024; +n=0:N-1; +w=2*%pi/5; +x=sin(w*n)+10*sin(2*w*n); +[s,f,t]=specgram(x); +grayplot(f,t,s) +xlabel("frequency") +ylabel("time") + +</scilab:image> + + +</refsection> + </refentry> diff --git a/help/en_US/subspaceMethodsInputParser.xml b/help/en_US/subspaceMethodsInputPars.xml index 908ead3..908ead3 100644 --- a/help/en_US/subspaceMethodsInputParser.xml +++ b/help/en_US/subspaceMethodsInputPars.xml diff --git a/help/en_US/upfirdn.xml b/help/en_US/upfirdn.xml index 6688531..98da4ec 100644 --- a/help/en_US/upfirdn.xml +++ b/help/en_US/upfirdn.xml @@ -32,20 +32,20 @@ <title>Parameters</title> <variablelist> <varlistentry><term>x:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para> The input signal.</para></listitem></varlistentry> <varlistentry><term>h:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para> The impulse response of the FIR filter.</para></listitem></varlistentry> <varlistentry><term>p:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para>The upsampling factor(default=1) </para></listitem></varlistentry> <varlistentry><term>q:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para>The downsampling factor(default=1) </para></listitem></varlistentry> </variablelist> </refsection> <refsection> <title>Description</title> <para> -This is an Octave function. + This function upsamples the input data in the matrix by a factor of n. Then the upsampled data is FIR filtered. After this, the resultant is downsampled. </para> </refsection> @@ -54,9 +54,9 @@ This function upsamples the input data in the matrix by a factor of n. Then the <title>Examples</title> <programlisting role="example"><![CDATA[ upfirdn([1,2,3],2,3,5) -ans = +//ans = -2. 0. +//2. 0. ]]></programlisting> </refsection> </refentry> diff --git a/help/en_US/window.xml b/help/en_US/wind.xml index 19d4312..19d4312 100644 --- a/help/en_US/window.xml +++ b/help/en_US/wind.xml diff --git a/help/en_US/wkeep.xml b/help/en_US/wkeep.xml index 3bac5e2..85c0692 100644 --- a/help/en_US/wkeep.xml +++ b/help/en_US/wkeep.xml @@ -44,7 +44,7 @@ <refsection> <title>Description</title> <para> -This is an Octave function +This function extracts a vector from the given vector of length l. [y]=wkeep(x,l) extracts a vector of length l from the centre of input vector x. [y]=wkeep(x,l,opt) extracts vector based on opt which could be 'l','r' or 'c' (left, right or central). </para> @@ -54,9 +54,9 @@ This is an Octave function <title>Examples</title> <programlisting role="example"><![CDATA[ 1. [y]=wkeep([1 2 3;4 5 6],[2 2]) -y= 1 2 +//y= 1 2 2. [y]=wkeep([1 2 3 4 5 6],3,'r') -y= 4 5 6 +//y= 4 5 6 ]]></programlisting> </refsection> </refentry> diff --git a/help/en_US/yulewalker.xml b/help/en_US/yulewalker.xml index 5fdac3c..d4393fb 100644 --- a/help/en_US/yulewalker.xml +++ b/help/en_US/yulewalker.xml @@ -44,4 +44,19 @@ Fit an AR (p)-model with Yule-Walker estimates given a vector C of autocovarianc Returns the AR coefficients, A, and the variance of white noise, V. </para> </refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ + [A,V]=yulewalker([1 2 3]) +// V = +// - 2.6666667 +// A = +// 1.3333333 +// 0.3333333 + + ]]></programlisting> +</refsection> + + </refentry> diff --git a/help/en_US/zerocrossing.xml b/help/en_US/zerocrossing.xml index 5109f99..4d7da0f 100644 --- a/help/en_US/zerocrossing.xml +++ b/help/en_US/zerocrossing.xml @@ -17,14 +17,14 @@ <refnamediv> <refname>zerocrossing</refname> - <refpurpose>This function estimates the points at which a given waveform crosses the x-axis.</refpurpose> + <refpurpose>This function estimates the points at which a given waveform y=y(x) crosses the x-axis using linear interpolation. </refpurpose> </refnamediv> <refsynopsisdiv> <title>Calling Sequence</title> <synopsis> - x = zerocrossing (w, y) + w = zerocrossing (x, y) </synopsis> </refsynopsisdiv> @@ -32,25 +32,42 @@ <title>Parameters</title> <variablelist> <varlistentry><term>w:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para>vector of points at which the function y(x) crosses x-axis. </para></listitem></varlistentry> <varlistentry><term>y:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para> The dependant variable,y(x)</para></listitem></varlistentry> <varlistentry><term>x:</term> - <listitem><para> </para></listitem></varlistentry> + <listitem><para> The independant variable</para></listitem></varlistentry> </variablelist> </refsection> <refsection> <title>Description</title> <para> -This is an Octave function. -This function estimates the points at which a given waveform y = y(w) crosses the x-axis. It uses linear interpolation. +This function estimates the points at which a given waveform y = y(x) crosses the x-axis. It uses linear interpolation. </para> </refsection> <refsection> <title>Examples</title> <programlisting role="example"><![CDATA[ +x = linspace(0,1,100); +y = 2*sin(2*%pi*x); +x0= zerocrossing(x,y); +//ans: +// x0 = 0. 0.5 1.0 1.5 +y0=interp1(x,y,x0) +plot(x,y,x0,y0,'x') + ]]></programlisting> + +<scilab:image> +x = linspace(0,2,200); +y = 2*sin(2*%pi*x); +x0= zerocrossing(x,y); +y0=interp1(x,y,x0) +plot(x,y,x0,y0,'x') + +</scilab:image> + </refsection> </refentry> |