Error in FREQANALYSIS
Grant McAuley
gmcauley at LLU.EDU
Fri Mar 16 17:50:52 CET 2007
Thanks Robert,
I have decided to go with option b).
The 'WINDOW' information is enlightening and very helpful.
~ Grant
On Thu, 2007-03-15 at 13:53 +0100, Robert Oostenveld wrote:
> Hi Grant
>
> On 14 Mar 2007, at 22:12, Christian Hesse wrote:
> > Ahhh ... you're trying to do all of this without the signal
> > processing toolbox, aren't you. In that case I must apologize for
> > having given you slightly inaccurate info before: the DPSS and
> > WINDOW functions are from the signal processing toolbox.
> >
> > ...
> > Realistically speaking though, it seems to me that your best
> > options are basically a) to get the signal processing toolbox, or
> > b) to just write your own matlab functions to estimate your power
> > spectra (about 3 lines of code) and then calculate your SEF and MF
> > measures (another few lines at most).
>
> with respect to option "b": I think the easiest is to replicate the
> WINDOW function from the signal preocessing toolbox. The dpss is
> difficult, but hanning, triangle, rectwin and some others are
> trivial. The WINDOW function is just a convenient wrapper function
> for various tapers. See at the bottom of this mail for the full help.
> The window replacement function to be written should behave as
>
> >> tap = window('hanning', 10)
> tap =
> 0.0794
> 0.2923
> 0.5712
> 0.8274
> 0.9797
> 0.9797
> 0.8274
> 0.5712
> 0.2923
> 0.0794
>
> >> tap = window('rectwin', 10)
> tap =
> 1
> 1
> 1
> 1
> 1
> 1
> 1
> 1
> 1
> 1
>
> >> tap = window('triang', 10)
> tap =
> 0.1000
> 0.3000
> 0.5000
> 0.7000
> 0.9000
> 0.9000
> 0.7000
> 0.5000
> 0.3000
> 0.1000
>
> I hope that this suggestion helps,
> Robert
>
>
> ---------------
>
> >> help window
> WINDOW Window function gateway.
> WINDOW(@WNAME,N) returns an N-point window of type specified
> by the function handle @WNAME in a column vector. @WNAME can
> be any valid window function name, for example:
> @bartlett - Bartlett window.
> @barthannwin - Modified Bartlett-Hanning window.
> @blackman - Blackman window.
> @blackmanharris - Minimum 4-term Blackman-Harris window.
> @bohmanwin - Bohman window.
> @chebwin - Chebyshev window.
> @flattopwin - Flat Top window.
> @gausswin - Gaussian window.
> @hamming - Hamming window.
> @hann - Hann window.
> @kaiser - Kaiser window.
> @nuttallwin - Nuttall defined minimum 4-term Blackman-Harris
> window.
> @parzenwin - Parzen (de la Valle-Poussin) window.
> @rectwin - Rectangular window.
> @tukeywin - Tukey window.
> @triang - Triangular window.
> WINDOW(@WNAME,N,OPT) designs the window with the optional input
> argument
> specified in OPT. To see what the optional input arguments are,
> see the help
> for the individual windows, for example, KAISER or CHEBWIN.
> WINDOW launches the Window Design & Analysis Tool (WinTool).
> EXAMPLE:
> N = 65;
> w = window(@blackmanharris,N);
> w1 = window(@hamming,N);
> w2 = window(@gausswin,N,2.5);
> plot(1:N,[w,w1,w2]); axis([1 N 0 1]);
> legend('Blackman-Harris','Hamming','Gaussian');
>
> See also bartlett, barthannwin, blackman, blackmanharris,
> bohmanwin,
> chebwin, gausswin, hamming, hann, kaiser, nuttallwin,
> parzenwin,
> rectwin, triang, tukeywin, WINTOOL.
--
Grant McAuley
Research Affairs IS Support
Loma Linda University
909-558-1000 Ext 87750
gmcauley at llu.edu
More information about the fieldtrip
mailing list