亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ctf_read_meg4.m

?? 讀取CTF腦磁圖數據的Matlab代碼
?? M
字號:
function [ctf] = ctf_read_meg4(folder,ctf,CHAN,TIME,TRIALS);% ctf_read_meg4 - read meg4 format data from a CTF .ds folder%% [ctf] = ctf_read_meg4([folder],[ctf],[CHAN],[TIME],[TRIALS]);%% INPUTS%% folder - the directory of the .ds data set to read.  By% default, a gui prompts for the folder.%% ctf - a struct with setup, sensor and data fields.  If the setup field is% missing or empty, this function calls ctf_read_res4.%% CHAN - a integer array of channel numbers to read.% eg, [30:35] reads channels 30 to 35.  Also% If CHAN = 'eeg', read only eeg channels/sensorIndices% If CHAN = 'meg', read only meg channels/sensorIndices% If CHAN = 'ref', read only reference channels/sensorIndices% IF CHAN = 'vc', read only SAM virtual channels/sensorIndices% If CHAN = 'other', read only the other channels/sensorIndices%% TIME - eg. [0 5] - the desired time interval to read, in sec.%        If TIME = 'all', all data is read (the default)%% TRIALS - If TRIALS = n, the nth trial will be read.%          If TRIALS = [3,5,8], reads trials 3,5, and 8 such that%          ctf.data{1} = data for trial 3,%          ctf.data{2} = data for trial 5, and %          ctf.data{3} = data for trial 8.%          If TRIALS = [3:7], reads trials 3 to 7%          If TRIALS = 'all', reads all data (the default)%% OUTPUTS% ctf.data                  - cell array of all the data, eg. ctf.data{x}% ctf.sensor.names          - cell array of sensor names% ctf.sensor.location       - array of sensor locations for plotting% ctf.sensor.orientation    - array of sensor orientations% ctf.header                - used for writing new meg4 file%%%      <>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> %%      <                                                       > %  %      <                      DISCLAIMER:                      > %%      <                                                       > %%      < THIS PROGRAM IS INTENDED FOR RESEARCH PURPOSES ONLY.  > %%      < THIS PROGRAM IS IN NO WAY INTENDED FOR CLINICAL OR    > %%      <                     OFFICIAL USE.                     > %%      <                                                       > %%      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<> %%% $Revision: 1.3 $ $Date: 2005/02/18 04:53:42 $% Licence:  GNU GPL, no express or implied warranties% Modified: 2/2005, Fred Carver%                   - modified to read new and old format ctf datasets% Modified: 11/2003, Darren.Weber_at_radiology.ucsf.edu%                    - modified from NIH code simply to allocate data into%                    one large struct (ctf)%                    - modified channel selection section at the end so%                    that it doesn't try to get orientation information for%                    EEG channels%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if ~exist('folder','var'),  if ~exist('ctf','var'),    ctf = ctf_folder;  else    ctf = ctf_folder([],ctf);  endelse  if ~exist('ctf','var'),    ctf = ctf_folder(folder);  else    ctf = ctf_folder(folder,ctf);  endendif ~isfield(ctf,'setup'),  ctf = ctf_read_res4(ctf.folder);endif ~exist('CHAN','var'),   CHAN   = 'all'; endif ~exist('TIME','var'),   TIME   = 'all'; endif ~exist('TRIALS','var'), TRIALS = 'all'; endif isempty(CHAN),   CHAN   = 'all'; endif isempty(TIME),   TIME   = 'all'; endif isempty(TRIALS), TRIALS = 'all'; endsmallCHAN = 0;switch num2str(CHAN),  case 'meg',    CHAN = ctf.sensor.index.meg;  case 'ref',    CHAN = ctf.sensor.index.ref;  case 'eeg',    CHAN = ctf.sensor.index.eeg;  case 'other',    CHAN = ctf.sensor.index.other;  case 'all',    CHAN = [1:ctf.setup.number_channels];  otherwise    % assume the input is a range of channel numbersendswitch num2str(TIME),  case 'all',    TIME = ctf.setup.time_sec;  otherwise    % assume the input is a range of timesendswitch num2str(TRIALS),  case 'all',    TRIALS = 1:ctf.setup.number_trials;  otherwise    % assume the input is a range of trialsend%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ver = '$Revision: 1.3 $';fprintf('\nCTF_READ_MEG4 [v %s]\n',ver(11:15)); tic;% open the data file[path,rootname] = fileparts(ctf.folder);[fid,message] = fopen([ctf.folder,filesep,rootname,'.meg4'],'rb','s');if fid < 0, error(message); end% Read the header (data format identifier)ctf.header.meg4 = char(fread(fid,8,'char'))';% check the format%if strmatch('MEG41CP',ctf.header.meg4),  % OK, we can handle this format%else%  msg = sprintf('May not read "%s" format correctly',ctf.header.meg4);%  warning(msg);%end% Get sensor indicesmegIndex =   ctf.sensor.index.meg;refIndex =   ctf.sensor.index.ref;eegIndex =   ctf.sensor.index.eeg;vcIndex =    ctf.sensor.index.vc;otherIndex = ctf.sensor.index.other;% Setup gains and offsetschannel_gain = zeros(1,ctf.setup.number_channels);channel_gain(megIndex)   = [ctf.sensor.info(megIndex).proper_gain] .* [ctf.sensor.info(megIndex).q_gain];channel_gain(refIndex)   = [ctf.sensor.info(refIndex).proper_gain] .* [ctf.sensor.info(refIndex).q_gain];channel_gain(eegIndex)   = [ctf.sensor.info(eegIndex).q_gain];channel_gain(vcIndex)   = [ctf.sensor.info(vcIndex).q_gain];channel_gain(otherIndex) = [ctf.sensor.info(otherIndex).q_gain];trial_size  = 4 * ctf.setup.number_channels * ctf.setup.number_samples;small_trial = 4 * (min(CHAN)-1) * ctf.setup.number_samples;large_trial = 4 * (ctf.setup.number_channels - max(CHAN)) * ctf.setup.number_samples; % check the durationduration = TIME(end) - TIME(1);if duration > ctf.setup.duration_trial,  fprintf('...TIME input too large for trial\n')  duration = ctf.setup.duration_trial;  fprintf('...setting TIME= %g seconds (ctf.setup.duration_trial)',ctf.setup.duration_trial);endsamples = round((duration) * ctf.setup.sample_rate) + 1;intime  = round((TIME(1) - ctf.setup.time_sec(1)) * ctf.setup.sample_rate) + 1;% s_rt = 1/(ctf.setup.time_sec(2) - ctf.setup.time_sec(1));% samples = round((duration)*s_rt)+1;% intime = round((TIME(1)-ctf.setup.time_sec(1))*s_rt)+1;% Read trial datactf.setup.number_trials = length(TRIALS);ctf.setup.number_channels = length(CHAN);channels = length([min(CHAN):max(CHAN)]);ctf.data = cell(ctf.setup.number_trials,1);tr = 0;for trial = TRIALS,    tr = tr + 1;    ctf.data{tr} = zeros(samples,channels);    if tr > 1,    backspaces = '\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b';    fprintf([backspaces,'...reading %4d of %4d trials\n'],tr,ctf.setup.number_trials);  else    fprintf('...reading %4d of %4d trials\n',tr,ctf.setup.number_trials);  end    % Define data file bytes to read  if trial == TRIALS(1);    % 1st trial    bytes = [ (trial-1) * trial_size ] + small_trial + [ 4 * (intime-1) ];    fseek(fid,bytes,0);  else    bytes = [ (trial - TRIALS(tr-1) -1) * trial_size ] + small_trial + large_trial;    fseek(fid,bytes,0);  end    %Read data, channels in columns, data samples in rows  %fseek(fid,ftell(fid) + 4,-1);    ctf.data{tr} = fread(fid,[samples channels],[num2str(samples),'*int32=>int32'],4*(ctf.setup.number_samples-samples));    % [DLW] Why is this CHAN - min(CHAN)+1?  The next line only uses CHAN.  ctf.data{tr} = ctf.data{tr}(:,CHAN - min(CHAN)+1);    ctf.data{tr} = double(ctf.data{tr}) * diag(1./channel_gain(CHAN));  end% assign sensor locations and orientations for selected channels, this% section will simplify the data allocated by ctf_read_res4fprintf('...sorting %d sensors\n',ctf.setup.number_channels);ctf.sensor.location = zeros(3,ctf.setup.number_channels);ctf.sensor.orientation = zeros(3,ctf.setup.number_channels);j=0;for channel = CHAN,    % not sure this next line makes sense [DLW]  j=j+1;    % All channels have a label  ind = strfind(ctf.sensor.info(channel).label,'-');  if isempty(ind),    ctf.sensor.label{1,j} = ctf.sensor.info(channel).label;  else    ctf.sensor.label{1,j} = ctf.sensor.info(channel).label(1:ind-1);  end    % All channels have a location    % EEG channels do not have any orientation    switch ctf.sensor.info(channel).index,        case {ctf.sensor.type.meg, ctf.sensor.type.ref},      %0=Reference Channels,       %1=More Reference Channels,       %5=MEG Channels            % MEG channels are radial gradiometers, so they have an inner (1) and      % an outer (2) location - it might be better to take the average of      % their locations      if ~isempty(ctf.sensor.info(channel).location),        ctf.sensor.location(:,j) = ctf.sensor.info(channel).location(:,1);      end            if ~isempty(ctf.sensor.info(channel).orientation),        ctf.sensor.orientation(:,j) = ctf.sensor.info(channel).orientation(:,1);      end          case ctf.sensor.type.eeg,      %9=EEG Channels            if ~isempty(ctf.sensor.info(channel).location),        ctf.sensor.location(:,j) = ctf.sensor.info(channel).location(:,1);      end        endend%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NEED TO CHECK ctf.setup parameters here, to adjust for any changes% required by the CHAN, TIME, TRIALS inputs%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if ctf.setup.number_channels ~= size(ctf.data,2),  %error('setup.number_channels ~= size(ctf.data,2)');endt = toc; fprintf('...done (%6.2f sec)\n\n',t);return

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色狠狠色综合| 欧美中文一区二区三区| 99精品视频一区二区| 欧美伊人久久大香线蕉综合69| 91精品国产综合久久福利| 久久精品男人的天堂| 亚洲一区二区三区激情| 国产精品亚洲第一| 欧美人伦禁忌dvd放荡欲情| 中文字幕精品一区| 久久不见久久见中文字幕免费| 97精品电影院| 久久久久久麻豆| 午夜av区久久| 色偷偷成人一区二区三区91| 精品国产乱码久久久久久影片| 一区二区三区在线播| 国产成人午夜99999| 日韩欧美精品三级| 午夜精品aaa| 欧美最猛黑人xxxxx猛交| 亚洲欧洲成人精品av97| 国产精品亚洲一区二区三区在线| 在线电影一区二区三区| 亚洲一线二线三线视频| 99久久精品久久久久久清纯| 久久日韩粉嫩一区二区三区| 奇米一区二区三区av| 欧美视频中文字幕| 一区二区在线看| 91麻豆免费看| 国产精品理论片| 成人性生交大片免费看中文| 久久精品这里都是精品| 韩国一区二区视频| 精品裸体舞一区二区三区| 麻豆一区二区三| 日韩一级大片在线| 精品一二线国产| 欧美v国产在线一区二区三区| 日韩影院在线观看| 91麻豆精品国产无毒不卡在线观看 | 一区视频在线播放| 成人听书哪个软件好| 欧美国产乱子伦 | 国产欧美一区二区三区鸳鸯浴| 狠狠色丁香久久婷婷综| 欧美精品一区二区三区高清aⅴ| 裸体健美xxxx欧美裸体表演| 日韩女优电影在线观看| 久久er精品视频| 久久精品综合网| 99天天综合性| 亚洲国产日产av| 欧美一级在线视频| 国产成人精品影院| 亚洲精品第1页| 欧美精品国产精品| 韩国精品主播一区二区在线观看| 久久夜色精品国产欧美乱极品| 粉嫩蜜臀av国产精品网站| 综合久久久久久| 欧美三级乱人伦电影| 麻豆精品一区二区综合av| 久久亚洲免费视频| 色综合色综合色综合 | 99视频精品在线| 亚洲伊人伊色伊影伊综合网| 日韩一区二区三区视频| 国产福利一区二区三区在线视频| 中文字幕高清一区| 欧美午夜寂寞影院| 国产一区二区在线影院| 中文字幕一区二区不卡| 欧美蜜桃一区二区三区 | 一区二区三区美女| 欧美大片在线观看| 99精品黄色片免费大全| 免费高清成人在线| 国产精品久久二区二区| 欧美日韩一卡二卡三卡| 国产一级精品在线| 亚洲国产精品欧美一二99| 久久综合精品国产一区二区三区 | 国产综合色产在线精品| 一区二区三区在线视频免费 | 69av一区二区三区| 成人激情文学综合网| 日本中文在线一区| 亚洲女人的天堂| 国产色一区二区| 在线不卡免费欧美| 91丨porny丨国产入口| 激情综合网最新| 午夜激情一区二区三区| ㊣最新国产の精品bt伙计久久| 日韩欧美视频一区| 欧美三级电影网| 99re这里只有精品首页| 国内偷窥港台综合视频在线播放| 亚洲一区二区三区爽爽爽爽爽 | 蜜桃精品视频在线| 一区二区三区资源| 最新不卡av在线| 国产亚洲一区二区在线观看| 91精品在线免费| 欧美午夜精品久久久| 91麻豆成人久久精品二区三区| 国产麻豆成人传媒免费观看| 日韩精品福利网| 一区二区三区精品视频在线| 亚洲欧洲精品一区二区三区| 国产亚洲视频系列| 日韩精品自拍偷拍| 欧美一级夜夜爽| 91精品在线免费| 3atv一区二区三区| 欧美精品视频www在线观看| 欧美午夜不卡视频| 欧美性受xxxx黑人xyx| 一本久久a久久精品亚洲| 99久久免费视频.com| www.视频一区| 91性感美女视频| 日本韩国一区二区三区视频| 色域天天综合网| 色综合激情久久| 欧美日韩一区二区电影| 欧美日韩精品一区二区三区蜜桃| 欧美日韩高清一区二区不卡| 欧美视频在线一区二区三区 | 99re66热这里只有精品3直播 | 久久精品99国产精品| 极品美女销魂一区二区三区免费| 中文字幕欧美一区| 欧美精品一区二区三区在线| 欧美亚洲国产bt| www.激情成人| 极品少妇xxxx偷拍精品少妇| 亚洲国产视频网站| 亚洲色图视频免费播放| 国产日韩综合av| 日韩免费高清av| 欧美日韩国产美女| 一本大道av伊人久久综合| 粉嫩aⅴ一区二区三区四区| 久久97超碰国产精品超碰| 亚洲一区二区三区国产| 国产精品久久久久久久第一福利| 欧美电影免费观看高清完整版在线| 欧洲精品中文字幕| 91香蕉视频mp4| 成人性生交大片免费看视频在线 | 日韩精品一区二区三区老鸭窝| 欧美视频一二三区| 色综合激情久久| 99久久精品免费精品国产| 成人一区二区三区| 丁香啪啪综合成人亚洲小说| 国产乱码精品一品二品| 国内精品久久久久影院薰衣草| 青青草视频一区| 蜜乳av一区二区三区| 免费观看一级欧美片| 午夜视频在线观看一区| 亚洲成a人片综合在线| 亚洲综合色视频| 亚洲国产日日夜夜| 日韩福利视频导航| 蜜桃精品视频在线| 国产剧情一区二区| www.亚洲精品| 在线亚洲+欧美+日本专区| 欧美视频一区在线| 欧美一区二区三区男人的天堂| 日韩欧美一级在线播放| 精品国产青草久久久久福利| 欧美精品一区二| 中文字幕精品—区二区四季| 亚洲人成网站色在线观看| 亚洲综合激情网| 麻豆高清免费国产一区| 国产精品羞羞答答xxdd| 91麻豆国产自产在线观看| 6080国产精品一区二区| 精品久久99ma| 国产精品视频九色porn| 亚洲一区二区三区四区不卡| 青青草原综合久久大伊人精品| 国产精品一区二区男女羞羞无遮挡 | 久久av资源网| 粉嫩在线一区二区三区视频| 色天使色偷偷av一区二区| 337p亚洲精品色噜噜狠狠| 久久婷婷一区二区三区| 亚洲免费观看在线视频| 免费人成在线不卡| 91麻豆国产福利在线观看| 日韩一区国产二区欧美三区| 国产精品久久久久毛片软件|