ctf_read_old.m

来自「含有多种ICA算法的eeglab工具箱」· M 代码 · 共 87 行

M
87
字号
function [ctf] = ctf_read(folder,CHAN,TIME,TRIALS);% ctf_read - Read data from a CTF .ds folder%% [ctf] = ctf_read( [folder], [CHAN], [TIME], [TRIALS] );% % eg,%     ctf = ctf_read; % inputs are all optional%     ctf = ctf_read('/data/directory/datasetname.ds');%     ctf = ctf_read(folder,'meg','all','all');% % ctf struct has fields:%% ctf.data - all of the data, 'data{1}' will display the first data set% ctf.header% ctf.setup% ctf.sensorNames% ctf.sensorLocations% ctf.sensorOrientations%% This function calls, in this order:%% ctf_read_res4 - to read in header, gain/offset, and sensor information% ctf_read_meg4 - to read in the data% % INPUTS---------------------------------------------------------------------% folder:     The .ds directory of the dataset.  If not given, a graphical%             prompt for the folder appears.%% CHAN:       eg. [30:35] - an interval of the desired channels to be read.%             If CHAN = 'eeg', only eeg channels/sensors%             If CHAN = 'meg', only meg channels/sensors%             If CHAN = 'ref', only reference channels/sensors%             If CHAN = 'other' only the other channels/sensors%             If CHAN = 'megeeg', only meg and eeg channels/sensors% % TIME:       eg. [0 5] - seconds 0 to 5, the time interval to read.%             If TIME = 'all', the entire duration of the trial(s) will%             be read (i.e. TIME = [1:ctf.setup.duration]).%             % TRIALS:     eg. TRIALS = n, the nth trial is read.%             eg. TRIALS = [3,5,8], trials 3, 5, and 8 are read such that,%                 ctf.data{1} = data for trial 3, %                 ctf.data{2} = data for trial 5, and%                 ctf.data{3} = data for trial 8.%             eg. TRIALS = [3:7], trials 3 through 7 are read.            %             eg. TRIALS = 'alltrials', the data for all of the trials are%                 read (i.e. TRIALS = [1:ctf.setup.duration]).%             %%      <>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> %%      <                                                      > %  %      <                    DISCLAIMER:                       > %%      <                                                      > %%      < THIS PROGRAM IS INTENDED FOR RESEARCH PURPOSES ONLY. > %%      < THIS PROGRAM IS IN NO WAY INTENDED FOR CLINICAL OR   > %%      <                    OFFICIAL USE.                     > %%      <                                                      > %%      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<> %%% $Revision: 1.1 $ $Date: 2004/03/18 06:38:41 $% Licence:  GNU GPL, no express or implied warranties% Modified: 11/2003, Darren.Weber_at_radiology.ucsf.edu%                    - modified from NIH code%                      simply to allocate data into one large struct%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if ~exist('folder','var'),  ctf = ctf_folder;else  ctf = ctf_folder(folder);endif ~exist('CHAN','var'),   CHAN   = 'all';  endif ~exist('TIME','var'),   TIME   = 'all';  endif ~exist('TRIALS','var'), TRIALS = 'all'; endctf = ctf_read_res4(ctf.folder);ctf = ctf_read_meg4(ctf.folder,ctf,CHAN,TIME,TRIALS);return

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?