diff options
author | Abhinav Dronamraju | 2017-11-29 17:34:00 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-11-29 17:34:00 +0530 |
commit | d97df53d72f66db206da540e909679fa863b51b6 (patch) | |
tree | d771887f58498d5b6fc4c6d1efe0db0376e7a043 | |
parent | 9539b5efb5ccf665a1cc4b8e814e96460b22e0ab (diff) | |
download | FOSSEE-Signal-Processing-Toolbox-d97df53d72f66db206da540e909679fa863b51b6.tar.gz FOSSEE-Signal-Processing-Toolbox-d97df53d72f66db206da540e909679fa863b51b6.tar.bz2 FOSSEE-Signal-Processing-Toolbox-d97df53d72f66db206da540e909679fa863b51b6.zip |
Added xml files and new functions
26 files changed, 611 insertions, 1 deletions
diff --git a/help/en_US/ar_psd.xml b/help/en_US/ar_psd.xml new file mode 100644 index 0000000..103f0d2 --- /dev/null +++ b/help/en_US/ar_psd.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from ar_psd.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="ar_psd" 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>ar_psd</refname> + <refpurpose>Calculate the power spectrum of the autoregressive model</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [PSD,F_OUT]=ar_psd (A, V) + [PSD,F_OUT]=ar_psd (A, V, FREQ) + [PSD,F_OUT]=ar_psd (A, V, FREQ, FS) + [PSD,F_OUT]=ar_psd (..., RANGE) + [PSD,F_OUT]=ar_psd (..., METHOD) + [PSD,F_OUT]=ar_psd (..., PLOTTYPE) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>A:</term> + <listitem><para>List of M=(order+1) autoregressive model coefficients. The first element of "ar_coeffs" is the zero-lag coefficient, which always has a value of 1.</para></listitem></varlistentry> + <varlistentry><term>V:</term> + <listitem><para>Square of the moving-average coefficient of the AR model.</para></listitem></varlistentry> + <varlistentry><term>FREQ:</term> + <listitem><para>Frequencies at which power spectral density is calculated, or a scalar indicating the number of uniformly distributed frequency values at which spectral density is calculated. (default = 256)</para></listitem></varlistentry> + <varlistentry><term>FS:</term> + <listitem><para>Sampling frequency (Hertz) (default=1)</para></listitem></varlistentry> + <varlistentry><term>Range:</term> + <listitem><para> 'half', 'onesided' : frequency range of the spectrum is from zero up to but not including sample_f/2. Power from negative frequencies is added to the positive side of the spectrum.'whole', 'twosided' : frequency range of the spectrum is-sample_f/2 to sample_f/2, with negative frequencies stored in "wrap around" order after the positive frequencies; e.g. frequencies for a 10-point 'twosided' spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 'shift', 'centerdc' : same as 'whole' but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See "help fftshift". If "freq" is vector, 'shift' is ignored. If model coefficients "ar_coeffs" are real, the default range is 'half', otherwise default range is 'whole'.</para></listitem></varlistentry> + <varlistentry><term>Method:</term> + <listitem><para>'fft': use FFT to calculate power spectrum. 'poly': calculate power spectrum as a polynomial of 1/z N.B. this argument is ignored if the "freq" argument is a vector. The default is 'poly' unless the "freq" argument is an integer power of 2.</para></listitem></varlistentry> + <varlistentry><term>Plot type:</term> + <listitem><para>'plot', 'semilogx', 'semilogy', 'loglog', 'squared' or 'db':specifies the type of plot. The default is 'plot', which means linear-linear axes. 'squared' is the same as 'plot'. 'dB' plots "10*log10(psd)". This argument is ignored and a spectrum is not plotted if the caller requires a returned value.</para></listitem></varlistentry> + <varlistentry><term>PSD:</term> + <listitem><para> estimate of power-spectral density</para></listitem></varlistentry> + <varlistentry><term>F_OUT:</term> + <listitem><para> frequency values</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +If the FREQ argument is a vector (of frequencies) the spectrum is calculated using the polynomial method and the METHOD argument is ignored. For scalar FREQ, an integer power of 2, or METHOD = "FFT", causes the spectrum to be calculated by FFT. Otherwise, the spectrum is calculated as a polynomial. It may be computationally more efficient to use the FFT method if length of the model is not much smaller than the number of frequency values. The spectrum is scaled so that spectral energy (area under spectrum) is the same as the time-domain energy (mean square of the signal). +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +[a,b]= ar_psd([1,2,3],2) + ]]></programlisting> +</refsection> +</refentry> diff --git a/help/en_US/bilinear.xml b/help/en_US/bilinear.xml new file mode 100644 index 0000000..0361759 --- /dev/null +++ b/help/en_US/bilinear.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from bilinear.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="bilinear" 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>bilinear</refname> + <refpurpose>Transform a s-plane filter specification into a z-plane specification</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [ZB, ZA] = bilinear (SB, SA, T) + [ZB, ZA] = bilinear (SZ, SP, SG, T) + [ZZ, ZP, ZG] = bilinear (...) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Description</title> + <para> +Transform a s-plane filter specification into a z-plane specification. Filters can be specified in either zero-pole-gain or transfer function form. The input form does not have to match the output form. 1/T is the sampling frequency represented in the z plane. + </para> + <para> +Note: this differs from the bilinear function in the signal processing toolbox, which uses 1/T rather than T. + </para> + <para> +Theory: Given a piecewise flat filter design, you can transform it from the s-plane to the z-plane while maintaining the band edges by means of the bilinear transform. This maps the left hand side of the s-plane into the interior of the unit circle. The mapping is highly non-linear, so you must design your filter with band edges in the s-plane positioned at 2/T tan(w*T/2) so that they will be positioned at w after the bilinear transform is complete. +</para> +</refsection> + +<refsection> + <title>Examples</title> + <programlisting role="example"><![CDATA[ +[ZB,ZA]=bilinear([1],[2,3],3) + ]]></programlisting> +</refsection> +</refentry> diff --git a/help/en_US/cohere.xml b/help/en_US/cohere.xml new file mode 100644 index 0000000..677e7a9 --- /dev/null +++ b/help/en_US/cohere.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from cohere.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="cohere" 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>cohere</refname> + <refpurpose>Estimate (mean square) coherence of signals "x" and "y"</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [Pxx,freqs] = cohere(x,y,Nfft,Fs,win,overlap,ran,plot_type,detrends) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>x:</term> + <listitem><para> [non-empty vector] system-input time-series data</para></listitem></varlistentry> + <varlistentry><term>y:</term> + <listitem><para> [non-empty vector] system-output time-series data</para></listitem></varlistentry> + <varlistentry><term>win:</term> + <listitem><para>[real vector] of window-function values between 0 and 1; the data segment has the same length as the window. Default window shape is Hamming. [integer scalar] length of each data segment. The default value is window=sqrt(length(x)) rounded up to the nearest integer power of 2; see 'sloppy' argument.</para></listitem></varlistentry> + <varlistentry><term>overlap:</term> + <listitem><para>[real scalar] segment overlap expressed as a multiple of window or segment length. 0 <= overlap < 1, The default is overlap=0.5 .</para></listitem></varlistentry> + <varlistentry><term>Nfft:</term> + <listitem><para>[integer scalar] Length of FFT. The default is the length of the "window" vector or has the same value as the scalar "window" argument. If Nfft is larger than the segment length, "seg_len", the data segment is padded with "Nfft-seg_len" zeros. The default is no padding. Nfft values smaller than the length of the data segment (or window) are ignored silently.</para></listitem></varlistentry> + <varlistentry><term>Fs:</term> + <listitem><para>[real scalar] sampling frequency (Hertz); default=1.0</para></listitem></varlistentry> + <varlistentry><term>range:</term> + <listitem><para>'half', 'onesided' : frequency range of the spectrum is zero up to but not including Fs/2. Power from negative frequencies is added to the positive side of the spectrum, but not at zero or Nyquist (Fs/2) frequencies. This keeps power equal in time and spectral domains. See reference [2]. 'whole', 'twosided' : frequency range of the spectrum is-Fs/2 to Fs/2, with negative frequenciesstored in "wrap around" order after the positivefrequencies; e.g. frequencies for a 10-point 'twosided'spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 'shift', 'centerdc' : same as 'whole' but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See "help fftshift". If data (x and y) are real, the default range is 'half', otherwise default range is 'whole'.</para></listitem></varlistentry> + <varlistentry><term>plot_type:</term> + <listitem><para> 'plot', 'semilogx', 'semilogy', 'loglog', 'squared' or 'db': specifies the type of plot. The default is 'plot', which means linear-linear axes. 'squared' is the same as 'plot'. 'dB' plots "10*log10(psd)". This argument is ignored and a spectrum is not plotted if the caller requires a returned value.</para></listitem></varlistentry> + <varlistentry><term>detrends:</term> + <listitem><para>'no-strip', 'none' -- do NOT remove mean value from the data'short', 'mean' -- remove the mean value of each segment from each segment of the data. 'linear',-- remove linear trend from each segment of the data.'long-mean'-- remove the mean value from the data before splitting it into segments. This is the default.</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +Estimate (mean square) coherence of signals "x" and "y". + </para> + <para> +Use the Welch (1967) periodogram/FFT method. +</para> +</refsection> +</refentry> diff --git a/help/en_US/diffpara.xml b/help/en_US/diffpara.xml new file mode 100644 index 0000000..be0f99c --- /dev/null +++ b/help/en_US/diffpara.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from diffpara.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="diffpara" 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>diffpara</refname> + <refpurpose>Return the estimator D for the differencing parameter of an integrated time series</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + [D, DD] = diffpara (X) + [D, DD] = diffpara (X, A) + [D, DD] = diffpara (X, A, B) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>X:</term> + <listitem><para> Input scalar or vector.</para></listitem></varlistentry> + <varlistentry><term>DD:</term> + <listitem><para>The estimators for all frequencies in the intervals described above.</para></listitem></varlistentry> + <varlistentry><term>D:</term> + <listitem><para>The mean of DD</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +Return the estimator D for the differencing parameter of an integrated time series. + </para> + <para> +The frequencies from [2*pi*a/t, 2*pi*b/T] are used for the estimation. If B is omitted, the interval [2*pi/T, 2*pi*a/T] is used. If both B and A are omitted then a = 0.5 * sqrt (T) and b = 1.5 * sqrt (T) is used, where T is the sample size. If X is a matrix, the differencing parameter of each column is estimated. + </para> + <para> +The estimators for all frequencies in the intervals described above is returned in DD. + </para> + <para> +The value of D is simply the mean of DD. +</para> +</refsection> +</refentry> diff --git a/help/en_US/durbinlevinson.xml b/help/en_US/durbinlevinson.xml new file mode 100644 index 0000000..0e6cc6d --- /dev/null +++ b/help/en_US/durbinlevinson.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from durbinlevinson.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="durbinlevinson" 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>durbinlevinson</refname> + <refpurpose>Perform one step of the Durbin-Levinson algorithm..</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + durbinlevinson (C); + durbinlevinson (C, OLDPHI); + durbinlevinson (C, OLDPHI, OLDV); + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>C:</term> + <listitem><para> The vector C specifies the autocovariances '[gamma_0, ..., gamma_t]' from lag 0 to T.</para></listitem></varlistentry> + <varlistentry><term>OLDPHI:</term> + <listitem><para> It specifies the coefficients based on C(T-1).</para></listitem></varlistentry> + <varlistentry><term>OLDV:</term> + <listitem><para> It specifies the corresponding error.</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +This is an Octave function. +Perform one step of the Durbin-Levinson. +If OLDPHI and OLDV are omitted, all steps from 1 to T of the algorithm are performed. +</para> +</refsection> +</refentry> diff --git a/help/en_US/fftshift1.xml b/help/en_US/fftshift1.xml new file mode 100644 index 0000000..8ce7eab --- /dev/null +++ b/help/en_US/fftshift1.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from fftshift1.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="fftshift1" 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>fftshift1</refname> + <refpurpose>Perform a shift of the vector X, for use with the 'fft' and 'ifft' functions, in order the move the frequency 0 to the center of the vector or matrix.</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + fftshift1 (X) + fftshift1 (X, DIM) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>X:</term> + <listitem><para>It is a vector of N elements corresponding to time samples</para></listitem></varlistentry> + <varlistentry><term>DIM:</term> + <listitem><para> The optional DIM argument can be used to limit the dimension along which the permutation occurs</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +This is an Octave function. +Perform a shift of the vector X, for use with the 'fft' and 'ifft' functions, in order the move the frequency 0 to the center of the vector or matrix. + </para> + <para> +If X is a vector of N elements corresponding to N time samples spaced by dt, then 'fftshift1 (fft (X))' corresponds to frequencies + </para> + <para> +f = [ -(ceil((N-1)/2):-1:1)*df 0 (1:floor((N-1)/2))*df ] + </para> + <para> +where df = 1 / dt. + </para> + <para> +If X is a matrix, the same holds for rows and columns. If X is an array, then the same holds along each dimension. + </para> + <para> +The optional DIM argument can be used to limit the dimension along +</para> +</refsection> +</refentry> diff --git a/help/en_US/fractdiff.xml b/help/en_US/fractdiff.xml new file mode 100644 index 0000000..c26508f --- /dev/null +++ b/help/en_US/fractdiff.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from fractdiff.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="fractdiff" 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>fractdiff</refname> + <refpurpose>Compute the fractional differences (1-L)^d x where L denotes the lag-operator and d is greater than -1.</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + fractdiff (X, D) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Description</title> + <para> +This is an Octave function. +Compute the fractional differences (1-L)^d x where L denotes the lag-operator and d is greater than -1. +</para> +</refsection> +</refentry> diff --git a/help/en_US/ifftshift1.xml b/help/en_US/ifftshift1.xml new file mode 100644 index 0000000..c281669 --- /dev/null +++ b/help/en_US/ifftshift1.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + * + * This help file was generated from ifftshift1.sci using help_from_sci(). + * + --> + +<refentry version="5.0-subset Scilab" xml:id="ifftshift1" 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>ifftshift1</refname> + <refpurpose>Undo the action of the 'fftshift1' function.</refpurpose> + </refnamediv> + + +<refsynopsisdiv> + <title>Calling Sequence</title> + <synopsis> + ifftshift1 (X) + ifftshift1 (X, DIM) + </synopsis> +</refsynopsisdiv> + +<refsection> + <title>Parameters</title> + <variablelist> + <varlistentry><term>X:</term> + <listitem><para>It is a vector of N elements corresponding to time samples</para></listitem></varlistentry> + <varlistentry><term>DIM:</term> + <listitem><para> The optional DIM argument can be used to limit the dimension along which the permutation occurs</para></listitem></varlistentry> + </variablelist> +</refsection> + +<refsection> + <title>Description</title> + <para> +This is an Octave function. +Undo the action of the 'fftshift1' function. + </para> + <para> +For even length X, 'fftshift1' is its own inverse, but odd lengths differ slightly. +</para> +</refsection> +</refentry> diff --git a/help/en_US/master_help.xml b/help/en_US/master_help.xml index 402f8b6..928bf3f 100644 --- a/help/en_US/master_help.xml +++ b/help/en_US/master_help.xml @@ -4,6 +4,7 @@ <!ENTITY a231328952124a7e187905e71aaf9cee0 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ac2poly.xml"> <!ENTITY acc27042e738d175d1131be40ac8443e4 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ac2rc.xml"> <!ENTITY a00c7c9f2a0021ff13869dce3b90df38c SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/arParEst.xml"> +<!ENTITY a85e6512c560e0bf936c3beeaa098c6c9 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ar_psd.xml"> <!ENTITY a2801dc954ec6ac2e1c314367aab7316b SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/arburg.xml"> <!ENTITY a1495e32bc54c2e2975785e8e2e4521bd SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/arch_test.xml"> <!ENTITY aa86636858e7127f17b93747fc8f3ec30 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/arcov.xml"> @@ -13,6 +14,7 @@ <!ENTITY af8a337c857d4b373e49c0032acb1370f SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/bartlett.xml"> <!ENTITY a8db037e6c34a1ac0f7db27577e08e15d SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/besselap.xml"> <!ENTITY a31f48c823b3b36a8c44e96ff54eaf66a SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/besself.xml"> +<!ENTITY a1f0975c78250aac81c6d5a79d8c93eab SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/bilinear.xml"> <!ENTITY a4965260600d5ae3055dc940551b4155a SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/bitrevorder.xml"> <!ENTITY a203e8f0f36fcdb6d7dab204312a41134 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/blackman.xml"> <!ENTITY a33562ce8ee2b64f5e49f771f94e64714 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/blackmanharris.xml"> @@ -38,6 +40,7 @@ <!ENTITY a1dc032779f7ba8e8f69e8f79dfb144d5 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/chirp.xml"> <!ENTITY a5bf1548e6f5419396992c7e5fee10e44 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/clustersegment.xml"> <!ENTITY a675cd787aff166461d9e9da55d591875 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/cmorwavf.xml"> +<!ENTITY a2b41713030e0a16e3e381cc96ff62544 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/cohere.xml"> <!ENTITY adc56a73851265426ed0c3db40f3a0d2e SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/convmtx.xml"> <!ENTITY a3d40cac540363daecb58818938d2b1d3 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/corrmtx.xml"> <!ENTITY ad2840257a4ded4da25428645e8a8fd22 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/cplxreal.xml"> @@ -50,9 +53,11 @@ <!ENTITY a732f6e560fa62dcfe2137f94ce0b812b SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/decimate.xml"> <!ENTITY aead61bf67b6895372794be69a80b5ab9 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/detrend1.xml"> <!ENTITY a8e9030fad0ea16388695b20a07e04334 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/dftmtx.xml"> +<!ENTITY a1d56d414b955dad7a64ae7c13171931e SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/diffpara.xml"> <!ENTITY a3ffbb42a185eaf6b62029b6efc883d6b SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/diric.xml"> <!ENTITY ac93a3534190eae2db767de3935ad4fbc SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/downsample.xml"> <!ENTITY afe6460b06ca50c9c2d156ea6806d2ed9 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/dst1.xml"> +<!ENTITY a227944d1935a789cec8341413d58151d SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/durbinlevinson.xml"> <!ENTITY a52aa309fac8ef71cd8d143ac51969fe0 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/dutycycle.xml"> <!ENTITY aa0ecb21a4fba74cd96dd91d64d4f13ef SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ellip.xml"> <!ENTITY a54ce5c2d68eb85b370486a8657432e59 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ellipap.xml"> @@ -63,6 +68,7 @@ <!ENTITY a61dce7ba646ca92aaf5a1ba090aa25e4 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fft.xml"> <!ENTITY ad146f651e2b3ae0f2c4548c9d31b9324 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fft2.xml"> <!ENTITY a093a9f733664f253ef62c57cbfd1f345 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fftfilt.xml"> +<!ENTITY ac1d05174ad6903658715873090e2337d SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fftshift1.xml"> <!ENTITY ad9f3946f61509aa68a6555cc8e1e89c4 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fht.xml"> <!ENTITY a0b5dd6bfc7c995741ff59cb1f2e6bd9d SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/filternorm.xml"> <!ENTITY a6f9f6be023cda42def4540ebe4a826ad SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/filtfilt.xml"> @@ -72,6 +78,7 @@ <!ENTITY a94e89cc06baa492675fb0ba33b84c454 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/firtype.xml"> <!ENTITY a19950da21e14157b78311a84cf566c31 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/flattopwin.xml"> <!ENTITY a997024f7f60a0e9b5b06fb25b4549196 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fracshift.xml"> +<!ENTITY a36e682243b9d539831279ec2794d4dcf SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fractdiff.xml"> <!ENTITY a60063fcaf779858435eab52d0438f7c0 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/freqs.xml"> <!ENTITY a5b1b81f5a27ba264b58d0ede7bf40d6e SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fwhm.xml"> <!ENTITY aaa8fd7d64f02100f0ff4b9f5a601b502 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/fwhmjlt.xml"> @@ -95,6 +102,7 @@ <!ENTITY a6fd54fa41c0d83b890ecda9094cd757f SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/idst1.xml"> <!ENTITY a9a5ec7990aa1e0ee187582dfea2e2f18 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ifft.xml"> <!ENTITY a6c98b32822a438724a01bbbc3c6e8972 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ifft2.xml"> +<!ENTITY ac144cb9b3a31dd3325159821e24eac51 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ifftshift1.xml"> <!ENTITY a414728f3a3bc742adaead017680e9eb1 SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ifht.xml"> <!ENTITY a2992435e7a3da65808422b5922e44afd SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/ifwht.xml"> <!ENTITY a056e2f09f5221e8999a0fea1c1fa878d SYSTEM "/home/abhinav/Documents/IITB/Repos/FOSSEE-Signal-Processing-Toolbox/help/en_US/iirlp2mb.xml"> @@ -260,6 +268,7 @@ &a231328952124a7e187905e71aaf9cee0; &acc27042e738d175d1131be40ac8443e4; &a00c7c9f2a0021ff13869dce3b90df38c; +&a85e6512c560e0bf936c3beeaa098c6c9; &a2801dc954ec6ac2e1c314367aab7316b; &a1495e32bc54c2e2975785e8e2e4521bd; &aa86636858e7127f17b93747fc8f3ec30; @@ -269,6 +278,7 @@ &af8a337c857d4b373e49c0032acb1370f; &a8db037e6c34a1ac0f7db27577e08e15d; &a31f48c823b3b36a8c44e96ff54eaf66a; +&a1f0975c78250aac81c6d5a79d8c93eab; &a4965260600d5ae3055dc940551b4155a; &a203e8f0f36fcdb6d7dab204312a41134; &a33562ce8ee2b64f5e49f771f94e64714; @@ -294,6 +304,7 @@ &a1dc032779f7ba8e8f69e8f79dfb144d5; &a5bf1548e6f5419396992c7e5fee10e44; &a675cd787aff166461d9e9da55d591875; +&a2b41713030e0a16e3e381cc96ff62544; &adc56a73851265426ed0c3db40f3a0d2e; &a3d40cac540363daecb58818938d2b1d3; &ad2840257a4ded4da25428645e8a8fd22; @@ -306,9 +317,11 @@ &a732f6e560fa62dcfe2137f94ce0b812b; &aead61bf67b6895372794be69a80b5ab9; &a8e9030fad0ea16388695b20a07e04334; +&a1d56d414b955dad7a64ae7c13171931e; &a3ffbb42a185eaf6b62029b6efc883d6b; &ac93a3534190eae2db767de3935ad4fbc; &afe6460b06ca50c9c2d156ea6806d2ed9; +&a227944d1935a789cec8341413d58151d; &a52aa309fac8ef71cd8d143ac51969fe0; &aa0ecb21a4fba74cd96dd91d64d4f13ef; &a54ce5c2d68eb85b370486a8657432e59; @@ -319,6 +332,7 @@ &a61dce7ba646ca92aaf5a1ba090aa25e4; &ad146f651e2b3ae0f2c4548c9d31b9324; &a093a9f733664f253ef62c57cbfd1f345; +&ac1d05174ad6903658715873090e2337d; &ad9f3946f61509aa68a6555cc8e1e89c4; &a0b5dd6bfc7c995741ff59cb1f2e6bd9d; &a6f9f6be023cda42def4540ebe4a826ad; @@ -328,6 +342,7 @@ &a94e89cc06baa492675fb0ba33b84c454; &a19950da21e14157b78311a84cf566c31; &a997024f7f60a0e9b5b06fb25b4549196; +&a36e682243b9d539831279ec2794d4dcf; &a60063fcaf779858435eab52d0438f7c0; &a5b1b81f5a27ba264b58d0ede7bf40d6e; &aaa8fd7d64f02100f0ff4b9f5a601b502; @@ -351,6 +366,7 @@ &a6fd54fa41c0d83b890ecda9094cd757f; &a9a5ec7990aa1e0ee187582dfea2e2f18; &a6c98b32822a438724a01bbbc3c6e8972; +&ac144cb9b3a31dd3325159821e24eac51; &a414728f3a3bc742adaead017680e9eb1; &a2992435e7a3da65808422b5922e44afd; &a056e2f09f5221e8999a0fea1c1fa878d; diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS Binary files differindex 2e55114..a84edbe 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB Binary files differindex ac87aca..f9a9626 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/DOCS.TAB diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS Binary files differindex ae19610..8255fa1 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/OFFSETS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS Binary files differindex 4544947..80cb637 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/POSITIONS diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA index 7d65376..8970d6a 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/SCHEMA @@ -1,2 +1,2 @@ JavaSearch 1.0 -TMAP bs=2048 rt=1 fl=-1 id1=2382 id2=1 +TMAP bs=2048 rt=1 fl=-1 id1=2513 id2=1 diff --git a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP Binary files differindex 6337674..ed7ae27 100644 --- a/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP +++ b/help/en_US/scilab_en_US_help/JavaHelpSearch/TMAP diff --git a/help/en_US/scilab_en_US_help/jhelpmap.jhm b/help/en_US/scilab_en_US_help/jhelpmap.jhm index 4e2930e..b4c824f 100644 --- a/help/en_US/scilab_en_US_help/jhelpmap.jhm +++ b/help/en_US/scilab_en_US_help/jhelpmap.jhm @@ -6,6 +6,7 @@ <mapID target="ac2poly" url="ac2poly.html"/> <mapID target="ac2rc" url="ac2rc.html"/> <mapID target="arParEst" url="arParEst.html"/> +<mapID target="ar_psd" url="ar_psd.html"/> <mapID target="arburg" url="arburg.html"/> <mapID target="arch_test" url="arch_test.html"/> <mapID target="arcov" url="arcov.html"/> @@ -15,6 +16,7 @@ <mapID target="bartlett" url="bartlett.html"/> <mapID target="besselap" url="besselap.html"/> <mapID target="besself" url="besself.html"/> +<mapID target="bilinear" url="bilinear.html"/> <mapID target="bitrevorder" url="bitrevorder.html"/> <mapID target="blackman" url="blackman.html"/> <mapID target="blackmanharris" url="blackmanharris.html"/> @@ -40,6 +42,7 @@ <mapID target="chirp" url="chirp.html"/> <mapID target="clustersegment" url="clustersegment.html"/> <mapID target="cmorwavf" url="cmorwavf.html"/> +<mapID target="cohere" url="cohere.html"/> <mapID target="convmtx" url="convmtx.html"/> <mapID target="corrmtx" url="corrmtx.html"/> <mapID target="cplxreal" url="cplxreal.html"/> @@ -52,9 +55,11 @@ <mapID target="decimate" url="decimate.html"/> <mapID target="detrend1" url="detrend1.html"/> <mapID target="dftmtx" url="dftmtx.html"/> +<mapID target="diffpara" url="diffpara.html"/> <mapID target="diric" url="diric.html"/> <mapID target="downsample" url="downsample.html"/> <mapID target="dst1" url="dst1.html"/> +<mapID target="durbinlevinson" url="durbinlevinson.html"/> <mapID target="dutycycle" url="dutycycle.html"/> <mapID target="ellip" url="ellip.html"/> <mapID target="ellipap" url="ellipap.html"/> @@ -65,6 +70,7 @@ <mapID target="fft" url="fft.html"/> <mapID target="fft2" url="fft2.html"/> <mapID target="fftfilt" url="fftfilt.html"/> +<mapID target="fftshift1" url="fftshift1.html"/> <mapID target="fht" url="fht.html"/> <mapID target="filternorm" url="filternorm.html"/> <mapID target="filtfilt" url="filtfilt.html"/> @@ -74,6 +80,7 @@ <mapID target="firtype" url="firtype.html"/> <mapID target="flattopwin" url="flattopwin.html"/> <mapID target="fracshift" url="fracshift.html"/> +<mapID target="fractdiff" url="fractdiff.html"/> <mapID target="freqs" url="freqs.html"/> <mapID target="fwhm" url="fwhm.html"/> <mapID target="fwhmjlt" url="fwhmjlt.html"/> @@ -97,6 +104,7 @@ <mapID target="idst1" url="idst1.html"/> <mapID target="ifft" url="ifft.html"/> <mapID target="ifft2" url="ifft2.html"/> +<mapID target="ifftshift1" url="ifftshift1.html"/> <mapID target="ifht" url="ifht.html"/> <mapID target="ifwht" url="ifwht.html"/> <mapID target="iirlp2mb" url="iirlp2mb.html"/> diff --git a/help/en_US/scilab_en_US_help/jhelptoc.xml b/help/en_US/scilab_en_US_help/jhelptoc.xml index 1b4fbc8..5d9607e 100644 --- a/help/en_US/scilab_en_US_help/jhelptoc.xml +++ b/help/en_US/scilab_en_US_help/jhelptoc.xml @@ -6,6 +6,7 @@ <tocitem target="ac2poly" text="ac2poly"/> <tocitem target="ac2rc" text="ac2rc"/> <tocitem target="arParEst" text="arParEst"/> +<tocitem target="ar_psd" text="ar_psd"/> <tocitem target="arburg" text="arburg"/> <tocitem target="arch_test" text="arch_test"/> <tocitem target="arcov" text="arcov"/> @@ -15,6 +16,7 @@ <tocitem target="bartlett" text="bartlett"/> <tocitem target="besselap" text="besselap"/> <tocitem target="besself" text="besself"/> +<tocitem target="bilinear" text="bilinear"/> <tocitem target="bitrevorder" text="bitrevorder"/> <tocitem target="blackman" text="blackman"/> <tocitem target="blackmanharris" text="blackmanharris"/> @@ -40,6 +42,7 @@ <tocitem target="chirp" text="chirp"/> <tocitem target="clustersegment" text="clustersegment"/> <tocitem target="cmorwavf" text="cmorwavf"/> +<tocitem target="cohere" text="cohere"/> <tocitem target="convmtx" text="convmtx"/> <tocitem target="corrmtx" text="corrmtx"/> <tocitem target="cplxreal" text="cplxreal"/> @@ -52,9 +55,11 @@ <tocitem target="decimate" text="decimate"/> <tocitem target="detrend1" text="detrend1"/> <tocitem target="dftmtx" text="dftmtx"/> +<tocitem target="diffpara" text="diffpara"/> <tocitem target="diric" text="diric"/> <tocitem target="downsample" text="downsample"/> <tocitem target="dst1" text="dst1"/> +<tocitem target="durbinlevinson" text="durbinlevinson"/> <tocitem target="dutycycle" text="dutycycle"/> <tocitem target="ellip" text="ellip"/> <tocitem target="ellipap" text="ellipap"/> @@ -65,6 +70,7 @@ <tocitem target="fft" text="fft"/> <tocitem target="fft2" text="fft2"/> <tocitem target="fftfilt" text="fftfilt"/> +<tocitem target="fftshift1" text="fftshift1"/> <tocitem target="fht" text="fht"/> <tocitem target="filternorm" text="filternorm"/> <tocitem target="filtfilt" text="filtfilt"/> @@ -74,6 +80,7 @@ <tocitem target="firtype" text="firtype"/> <tocitem target="flattopwin" text="flattopwin"/> <tocitem target="fracshift" text="fracshift"/> +<tocitem target="fractdiff" text="fractdiff"/> <tocitem target="freqs" text="freqs"/> <tocitem target="fwhm" text="fwhm"/> <tocitem target="fwhmjlt" text="fwhmjlt"/> @@ -97,6 +104,7 @@ <tocitem target="idst1" text="idst1"/> <tocitem target="ifft" text="ifft"/> <tocitem target="ifft2" text="ifft2"/> +<tocitem target="ifftshift1" text="ifftshift1"/> <tocitem target="ifht" text="ifht"/> <tocitem target="ifwht" text="ifwht"/> <tocitem target="iirlp2mb" text="iirlp2mb"/> diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar Binary files differindex f54e2b5..f6622b8 100644 --- a/jar/scilab_en_US_help.jar +++ b/jar/scilab_en_US_help.jar diff --git a/macros/ar_psd.sci b/macros/ar_psd.sci index d60e3c4..540dfec 100644 --- a/macros/ar_psd.sci +++ b/macros/ar_psd.sci @@ -1,4 +1,27 @@ function [P, F]= ar_psd(A, varargin) +//Calculate the power spectrum of the autoregressive model +//Calling Sequence +// [PSD,F_OUT]=ar_psd (A, V) +// [PSD,F_OUT]=ar_psd (A, V, FREQ) +// [PSD,F_OUT]=ar_psd (A, V, FREQ, FS) +// [PSD,F_OUT]=ar_psd (..., RANGE) +// [PSD,F_OUT]=ar_psd (..., METHOD) +// [PSD,F_OUT]=ar_psd (..., PLOTTYPE) +//Parameters +//A:List of M=(order+1) autoregressive model coefficients. The first element of "ar_coeffs" is the zero-lag coefficient, which always has a value of 1. +//V:Square of the moving-average coefficient of the AR model. +//FREQ:Frequencies at which power spectral density is calculated, or a scalar indicating the number of uniformly distributed frequency values at which spectral density is calculated. (default = 256) +//FS:Sampling frequency (Hertz) (default=1) +//Range: 'half', 'onesided' : frequency range of the spectrum is from zero up to but not including sample_f/2. Power from negative frequencies is added to the positive side of the spectrum.'whole', 'twosided' : frequency range of the spectrum is-sample_f/2 to sample_f/2, with negative frequencies stored in "wrap around" order after the positive frequencies; e.g. frequencies for a 10-point 'twosided' spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 'shift', 'centerdc' : same as 'whole' but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See "help fftshift". If "freq" is vector, 'shift' is ignored. If model coefficients "ar_coeffs" are real, the default range is 'half', otherwise default range is 'whole'. +// Method:'fft': use FFT to calculate power spectrum. 'poly': calculate power spectrum as a polynomial of 1/z N.B. this argument is ignored if the "freq" argument is a vector. The default is 'poly' unless the "freq" argument is an integer power of 2. +// Plot type:'plot', 'semilogx', 'semilogy', 'loglog', 'squared' or 'db':specifies the type of plot. The default is 'plot', which means linear-linear axes. 'squared' is the same as 'plot'. 'dB' plots "10*log10(psd)". This argument is ignored and a spectrum is not plotted if the caller requires a returned value. +//PSD: estimate of power-spectral density +//F_OUT: frequency values +//Description +//If the FREQ argument is a vector (of frequencies) the spectrum is calculated using the polynomial method and the METHOD argument is ignored. For scalar FREQ, an integer power of 2, or METHOD = "FFT", causes the spectrum to be calculated by FFT. Otherwise, the spectrum is calculated as a polynomial. It may be computationally more efficient to use the FFT method if length of the model is not much smaller than the number of frequency values. The spectrum is scaled so that spectral energy (area under spectrum) is the same as the time-domain energy (mean square of the signal). +//Examples +//[a,b]= ar_psd([1,2,3],2) + funcprot(0); rhs= argn(2); if(rhs <2 | rhs>5) diff --git a/macros/bilinear.sci b/macros/bilinear.sci index d58dd2a..387b8d0 100644 --- a/macros/bilinear.sci +++ b/macros/bilinear.sci @@ -1,4 +1,17 @@ function [Zb, Za, Zg]= bilinear(Sb,varargin) +// Transform a s-plane filter specification into a z-plane specification +//Calling Sequence +// [ZB, ZA] = bilinear (SB, SA, T) +// [ZB, ZA] = bilinear (SZ, SP, SG, T) +// [ZZ, ZP, ZG] = bilinear (...) +//Description +//Transform a s-plane filter specification into a z-plane specification. Filters can be specified in either zero-pole-gain or transfer function form. The input form does not have to match the output form. 1/T is the sampling frequency represented in the z plane. +// +//Note: this differs from the bilinear function in the signal processing toolbox, which uses 1/T rather than T. +// +//Theory: Given a piecewise flat filter design, you can transform it from the s-plane to the z-plane while maintaining the band edges by means of the bilinear transform. This maps the left hand side of the s-plane into the interior of the unit circle. The mapping is highly non-linear, so you must design your filter with band edges in the s-plane positioned at 2/T tan(w*T/2) so that they will be positioned at w after the bilinear transform is complete. +//Examples +//[ZB,ZA]=bilinear([1],[2,3],3) funcprot(0); lhs= argn(1); rhs= argn(2); diff --git a/macros/cohere.sci b/macros/cohere.sci index ad964a3..ba013ab 100644 --- a/macros/cohere.sci +++ b/macros/cohere.sci @@ -1,4 +1,21 @@ function [Pxx,freqs] = cohere(x,y,Nfft,Fs,win,overlap,ran,plot_type,detrends) +//Estimate (mean square) coherence of signals "x" and "y" +//Calling Sequence +// [Pxx,freqs] = cohere(x,y,Nfft,Fs,win,overlap,ran,plot_type,detrends) +//Parameters +//x: [non-empty vector] system-input time-series data +//y: [non-empty vector] system-output time-series data +//win:[real vector] of window-function values between 0 and 1; the data segment has the same length as the window. Default window shape is Hamming. [integer scalar] length of each data segment. The default value is window=sqrt(length(x)) rounded up to the nearest integer power of 2; see 'sloppy' argument. +//overlap:[real scalar] segment overlap expressed as a multiple of window or segment length. 0 <= overlap < 1, The default is overlap=0.5 . +//Nfft:[integer scalar] Length of FFT. The default is the length of the "window" vector or has the same value as the scalar "window" argument. If Nfft is larger than the segment length, "seg_len", the data segment is padded with "Nfft-seg_len" zeros. The default is no padding. Nfft values smaller than the length of the data segment (or window) are ignored silently. +//Fs:[real scalar] sampling frequency (Hertz); default=1.0 +//range:'half', 'onesided' : frequency range of the spectrum is zero up to but not including Fs/2. Power from negative frequencies is added to the positive side of the spectrum, but not at zero or Nyquist (Fs/2) frequencies. This keeps power equal in time and spectral domains. See reference [2]. 'whole', 'twosided' : frequency range of the spectrum is-Fs/2 to Fs/2, with negative frequenciesstored in "wrap around" order after the positivefrequencies; e.g. frequencies for a 10-point 'twosided'spectrum are 0 0.1 0.2 0.3 0.4 0.5 -0.4 -0.3 -0.2 -0.1 'shift', 'centerdc' : same as 'whole' but with the first half of the spectrum swapped with second half to put the zero-frequency value in the middle. (See "help fftshift". If data (x and y) are real, the default range is 'half', otherwise default range is 'whole'. +//plot_type: 'plot', 'semilogx', 'semilogy', 'loglog', 'squared' or 'db': specifies the type of plot. The default is 'plot', which means linear-linear axes. 'squared' is the same as 'plot'. 'dB' plots "10*log10(psd)". This argument is ignored and a spectrum is not plotted if the caller requires a returned value. +//detrends:'no-strip', 'none' -- do NOT remove mean value from the data'short', 'mean' -- remove the mean value of each segment from each segment of the data. 'linear',-- remove linear trend from each segment of the data.'long-mean'-- remove the mean value from the data before splitting it into segments. This is the default. +//Description +//Estimate (mean square) coherence of signals "x" and "y". +// +//Use the Welch (1967) periodogram/FFT method. rhs= argn(2); lhs= argn(1); if(rhs < 10 | rhs > 10) diff --git a/macros/diffpara.sci b/macros/diffpara.sci index 3f9e2d9..c36ae7c 100644 --- a/macros/diffpara.sci +++ b/macros/diffpara.sci @@ -1,4 +1,21 @@ function [D,DD] = diffpara(X,varargin) +//Return the estimator D for the differencing parameter of an integrated time series +//Calling Sequence +// [D, DD] = diffpara (X) +// [D, DD] = diffpara (X, A) +// [D, DD] = diffpara (X, A, B) +//Parameters +//X: Input scalar or vector. +//DD:The estimators for all frequencies in the intervals described above. +//D:The mean of DD +//Description +//Return the estimator D for the differencing parameter of an integrated time series. +// +//The frequencies from [2*pi*a/t, 2*pi*b/T] are used for the estimation. If B is omitted, the interval [2*pi/T, 2*pi*a/T] is used. If both B and A are omitted then a = 0.5 * sqrt (T) and b = 1.5 * sqrt (T) is used, where T is the sample size. If X is a matrix, the differencing parameter of each column is estimated. +// +//The estimators for all frequencies in the intervals described above is returned in DD. +// +//The value of D is simply the mean of DD. lhs= argn(1); rhs= argn(2); if(rhs <1 | rhs> 3) diff --git a/macros/durbinlevinson.sci b/macros/durbinlevinson.sci index cd56e48..74dbb46 100644 --- a/macros/durbinlevinson.sci +++ b/macros/durbinlevinson.sci @@ -1,4 +1,17 @@ function y= durbinlevinson(C, varargin) +// Perform one step of the Durbin-Levinson algorithm.. +//Calling Sequence +// durbinlevinson (C); +// durbinlevinson (C, OLDPHI); +// durbinlevinson (C, OLDPHI, OLDV); +//Parameters +//C: The vector C specifies the autocovariances '[gamma_0, ..., gamma_t]' from lag 0 to T. +//OLDPHI: It specifies the coefficients based on C(T-1). +//OLDV: It specifies the corresponding error. +//Description +//This is an Octave function. +//Perform one step of the Durbin-Levinson. +//If OLDPHI and OLDV are omitted, all steps from 1 to T of the algorithm are performed. rhs=argn(2); if(rhs<1 | rhs>3) error("Wrong number of input arguments"); diff --git a/macros/fftshift1.sci b/macros/fftshift1.sci index 2928850..d8721cd 100644 --- a/macros/fftshift1.sci +++ b/macros/fftshift1.sci @@ -1,4 +1,25 @@ function y= fftshift1(X,DIM) +//Perform a shift of the vector X, for use with the 'fft' and 'ifft' functions, in order the move the frequency 0 to the center of the vector or matrix. +//Calling Sequence +// fftshift1 (X) +// fftshift1 (X, DIM) +//Parameters +//X:It is a vector of N elements corresponding to time samples +//DIM: The optional DIM argument can be used to limit the dimension along which the permutation occurs +//Description +//This is an Octave function. +//Perform a shift of the vector X, for use with the 'fft' and 'ifft' functions, in order the move the frequency 0 to the center of the vector or matrix. +// +//If X is a vector of N elements corresponding to N time samples spaced by dt, then 'fftshift1 (fft (X))' corresponds to frequencies +// +//f = [ -(ceil((N-1)/2):-1:1)*df 0 (1:floor((N-1)/2))*df ] +// +//where df = 1 / dt. +// +//If X is a matrix, the same holds for rows and columns. If X is an array, then the same holds along each dimension. +// +//The optional DIM argument can be used to limit the dimension along + which the permutation occurs. rhs= argn(2); if(rhs <1 | rhs >2) error('Wrong number of Input arguments'); diff --git a/macros/fractdiff.sci b/macros/fractdiff.sci index 1731dc1..979a079 100644 --- a/macros/fractdiff.sci +++ b/macros/fractdiff.sci @@ -1,4 +1,10 @@ function y= fractdiff(x,d) +//Compute the fractional differences (1-L)^d x where L denotes the lag-operator and d is greater than -1. +//Calling Sequence +// fractdiff (X, D) +//Description +//This is an Octave function. +//Compute the fractional differences (1-L)^d x where L denotes the lag-operator and d is greater than -1. funcprot(0); rhs= argn(2); if(rhs < 2 | rhs >2) diff --git a/macros/ifftshift1.sci b/macros/ifftshift1.sci index 6c5ae8e..7426130 100644 --- a/macros/ifftshift1.sci +++ b/macros/ifftshift1.sci @@ -1,4 +1,16 @@ function y= ifftshift1(X,DIM) +//Undo the action of the 'fftshift1' function. +//Calling Sequence +// ifftshift1 (X) +// ifftshift1 (X, DIM) +//Parameters +//X:It is a vector of N elements corresponding to time samples +//DIM: The optional DIM argument can be used to limit the dimension along which the permutation occurs +//Description +//This is an Octave function. +//Undo the action of the 'fftshift1' function. +// +//For even length X, 'fftshift1' is its own inverse, but odd lengths differ slightly. rhs= argn(2); if(rhs <1 | rhs >2) error('Wrong number of Input arguments'); |