Home > vbmeg > external > mne > fiff_pick_info.m

fiff_pick_info

PURPOSE ^

SYNOPSIS ^

function [res] = fiff_pick_info(info,sel)

DESCRIPTION ^

 [res] = fiff_pick_info(info,sel)

 Pick desired channels from measurement info

 res       - Info modified according to sel
 info      - The original data
 sel       - List of channels to select

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [res] = fiff_pick_info(info,sel)
0002 %
0003 % [res] = fiff_pick_info(info,sel)
0004 %
0005 % Pick desired channels from measurement info
0006 %
0007 % res       - Info modified according to sel
0008 % info      - The original data
0009 % sel       - List of channels to select
0010 %
0011 
0012 %
0013 %   Author : Matti Hamalainen, MGH Martinos Center
0014 %   License : BSD 3-clause
0015 %
0016 %
0017 %   Revision 1.2  2006/04/23 15:29:40  msh
0018 %   Added MGH to the copyright
0019 %
0020 %   Revision 1.1  2006/04/22 10:59:30  msh
0021 %   Added fiff_pick_info
0022 %
0023 %
0024 
0025 me='MNE:fiff_pick_info';
0026 
0027 if nargin == 1
0028     sel = [];
0029 elseif nargin ~= 2
0030     error(me,'Incorrect number of arguments');
0031 end
0032 
0033 res = info;
0034 if isempty(sel)
0035     return;
0036 end
0037 
0038 
0039 res.chs      = res.chs(sel);
0040 res.ch_names = res.ch_names(sel);
0041 res.nchan    = length(sel);
0042 
0043 return;
0044 
0045 end

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