Home > vbmeg > external > mne > fiff_split_name_list.m

fiff_split_name_list

PURPOSE ^

SYNOPSIS ^

function [ names ] = fiff_split_name_list(list);

DESCRIPTION ^

 [names] = fiff_split_name_list(list)


 Split a name list containing colon-separated entries into a cell array
 containing the strings

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [ names ] = fiff_split_name_list(list);
0002 %
0003 % [names] = fiff_split_name_list(list)
0004 %
0005 %
0006 % Split a name list containing colon-separated entries into a cell array
0007 % containing the strings
0008 %
0009 
0010 
0011 %
0012 %   Author : Matti Hamalainen, MGH Martinos Center
0013 %   License : BSD 3-clause
0014 %
0015 %   Revision 1.3  2006/04/27 22:38:37  msh
0016 %   Splitting an empty list now results in an empty output.
0017 %   Added fiff_write_double and fiff_write_short
0018 %   Write an array of floats, ints, and doubles instead of just one value.
0019 %   Fixed help text of fiff_pick_channels.
0020 %
0021 %   Revision 1.2  2006/04/23 15:29:40  msh
0022 %   Added MGH to the copyright
0023 %
0024 %   Revision 1.1  2006/04/10 23:26:54  msh
0025 %   Added fiff reading routines
0026 %
0027 %
0028 
0029 rem = list;
0030 nnames = 0;
0031 if isempty(rem)
0032    names = [];
0033    return;
0034 end
0035 while true
0036     [ str, rem ]  = strtok(rem,':');
0037     if isempty(str)
0038         break;
0039     end
0040     nnames = nnames + 1;
0041     names{nnames} = str;
0042 end
0043 
0044 return;
0045

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