Home > vbmeg > external > mne > mne_read_noise_cov.m

mne_read_noise_cov

PURPOSE ^

SYNOPSIS ^

function [cov] = mne_read_noise_cov(fname)

DESCRIPTION ^

 [cov] = mne_read_noise_cov(fname)

 Reads a noise-covariance matrix from a fiff file

 fname      - The name of the file

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [cov] = mne_read_noise_cov(fname)
0002 %
0003 % [cov] = mne_read_noise_cov(fname)
0004 %
0005 % Reads a noise-covariance matrix from a fiff file
0006 %
0007 % fname      - The name of the file
0008 %
0009 %
0010 
0011 %
0012 %
0013 %   Author : Matti Hamalainen, MGH Martinos Center
0014 %   License : BSD 3-clause
0015 %
0016 %   Revision 1.5  2006/05/03 19:09:03  msh
0017 %   Fixed even more compatibility issues.
0018 %
0019 %   Revision 1.4  2006/04/23 15:29:41  msh
0020 %   Added MGH to the copyright
0021 %
0022 %   Revision 1.3  2006/04/20 21:49:38  msh
0023 %   Added mne_read_inverse_operator
0024 %   Changed some of the routines accordingly for more flexibility.
0025 %
0026 %   Revision 1.2  2006/04/18 20:44:46  msh
0027 %   Added reading of forward solution.
0028 %   Use length instead of size when appropriate
0029 %
0030 %   Revision 1.1  2006/04/12 17:09:28  msh
0031 %   Added routines for reading noise-covariance matrices
0032 %
0033 %
0034 
0035 me='MNE:mne_read_noise_cov';
0036 
0037 global FIFF;
0038 if isempty(FIFF)
0039    FIFF = fiff_define_constants();
0040 end
0041 %
0042 %   Open the file, create directory
0043 %
0044 [ fid, tree ] = fiff_open(fname);
0045 try
0046    cov = mne_read_cov(fid,tree,FIFF.FIFFV_MNE_NOISE_COV);
0047 catch
0048    fclose(fid);
0049    error(me,'%s',mne_omit_first_line(lasterr));
0050 end
0051 
0052 return;
0053 
0054 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005