David,

`there is a simpler solution to this problem. MVAR has been designed in
``such a way that NaN's are skipped.
``If you concatanate all "realizations" and insert a sufficient number of
``NaN's between each realization, and apply this large segment to MVAR,
``you are all set.
`
Using BIOSIG.SF.NET you can do:
[s,sz]=trigg(s, TRIG, ix1, ix2, MOP+1);
[AR,RC,PE]=mvar(s',MOP);

`The result is the esemble average of all segments. You can do this with
``all modes of MVAR.
`See also biosig/t300/TFMVAR.M
Alois
chorlian wrote:

Alois:
I am planning to implement the MVAR method outlined in Ding et
al. "Short-window spectral analysis ...", Biol. Cybern. 83,
35-45 (2000), which determines the covariance matrix by
averaging over multiple realizations of a process. Examining
your code for mvar(), I see that it would be easy to alter the
section for Mode == 6, as the covariance matrix calculations
for one loop index are not dependent on those for any
preceeding loop. However, for the Nutall-Strand modes, it
seems like a reaveraging step would be needed for every
interation of the loop. Since I am not confident that I could
modify Mode == 2 without difficulty, I will work with Mode ==
6. If I get it to work, I will give you the code for further
distribution. Do you have any suggestions before I start this
project?
David
David B. Chorlian
Senior Scientific Programmer, Neurodynamics Lab, SUNY/HSCB
voice: 718-270-2231; fax: 718-270-4081
chorlian***AT***cns.hscbklyn.edu

`
``
`