⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctf_read.m

📁 读取CTF脑磁图数据的Matlab代码
💻 M
字号:
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;%     ctf = ctf_read('/data/directory/datasetname.ds');%     ctf = ctf_read(folder,'megsens','alltimes','alltrials');% % ctf struct has fields:%% ctf.data - all of the data, 'read{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] or [30:35,38,78] - a vector of the desired channels to be read.%             If CHAN = 'eegsens', only eeg channels/sensors%             If CHAN = 'megsens', only meg channels/sensors%             If CHAN = 'refsens', only reference channels/sensors%             IF CHAN = 'vc', read only SAM virtual channels/sensors%             If CHAN = 'othersens' only the other channels/sensors% % TIME:       eg. [0 5] - seconds 0 to 5, the time interval to read.%             If TIME = 'alltimes', 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.2 $ $Date: 2004/01/07 03:35:18 $% 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -