function varargout = preproOEG17APD(fcn, varargin) % Preprocessor Function of OEG17APD Fromat: Normal.. % This Format Read OEG17APD. % And Plug-in Format Version 2.0 % % ** CREATE BASIC INFORMATION ** % Syntax: % basic_info = preproOEG17APD('createBasicIno'); % Return Information for OSP Application. % basic_info is structure that fields are % DispName : Display Name : String % Version : Version of the function % OpenKind : Kind of Open Function % IO_Kind : Kind of I/O Function % % ** Check If the file is in format. ** % Syntax: % [flag,msg] = preproOEG17APD('CheckFile',filename) % flag : true : In format (Available) % false : Out of Format. % msg : if false, reason why Out of Format. % filename : Full-Path of the File % % ** get Information of file ** % Syntax: % str = preproOEG17APD('getFileInfo',filename); % str : File Infromation. % Cell array of string. % filename : Full-Path of the File. % % ** get Information of This Function ** % Syntax: % str = preproOEG17APD('getFunctionInfo') % str : Information of the function. % Cell array of string. % % ** execute ** % Syntax: % [hdata, data] = preproOEG17APD('Execute', filename) % Continuous Data. % % OT_LOCAL_DATA = preproOEG17APD('ExecuteOld', filename) % OT_LOCAL_DATA : Version 2.0 Inner Data-Format. % Thsi will be removed % % See also OSPFILTERDATAFCN. % ====================================================================== % Copyright(c) 2020,2022 % National Institute of Advanced Industrial Science and Technology % % Released under the MIT license % https://opensource.org/licenses/MIT % ====================================================================== % == History == % OEG-17APD format loading routine % DATE:03.04.20 % WRITTEN:M.Ohashi % % Inprot form Upper ot_datalod. % create : 2020.04.20 % $Id: preproOEG17APD.m %======== Launch Switch ======== if strcmp(fcn,'createBasicInfo'), varargout{1} = createBasicInfo; return; end if nargout, [varargout{1:nargout}] = feval(fcn, varargin{:}); else feval(fcn, varargin{:}); end if 0 % Entry function createBasicInfo; getFunctionInfo; CheckFile; getFileInfo; Execute; % ExecuteOEG; end return; %=============================== %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function basicInfo= createBasicInfo % ** CREATE BASIC INFORMATION ** % Syntax: % basic_info = preproOEG17APD('createBasicIno'); % Return Information for OSP Application. % basic_info is structure that fields are % DispName : Display Name : String % Version : Version of the function % OpenKind : Kind of Open Function % IO_Kind : Kind of I/O Function %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% basicInfo.DispName ='OEG17APD'; basicInfo.Version =1.0; basicInfo.OpenKind =1; basicInfo.IO_Kind =1; % get Revision rver = '$Revision: 1.0 $';%- **@**** 20200425 [s,e]= regexp(rver, '[0-9.]'); try basicInfo.Version = str2double(rver(s(1):e(end))); catch basicInfo.Version =1.0; end return; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function fs=getFilterSpec % ** CREATE BASIC INFORMATION ** % Syntax: % filterspec = preproOEG17APD('getFilterSpec'); % Return FilterSpec of File-Select-Dilalogs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fs={'*.datx;','OEG17APD Text File'}; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function str = getFunctionInfo % get Information of This Function % str : Information of the function. % Cell array of string. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% bi = createBasicInfo; dd = '$Date: 2020/04/20 15:00:00 $'; dd([1:6, end]) = []; str={'=== OEG17APD Format ===', ... [' Revision : ' num2str(bi.Version)], ... [' Date : ' dd], ... ' ------------------------ ', ... ' Text Type', ... ' 1st Line : Header .... ', ... ' ------------------------ '}; return; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [flag, msg] = CheckFile(filename) % Syntax: % [flag,msg] = preproOEG17APD('CheckFile',filename) % flag : true : In format (Available) % false : Out of Format. % msg : if false, reason why Out of Format. % filename : Full-Path of the File %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [pname, fname,ext] = fileparts(filename); % Check Extension if strcmpi(ext,'.datx')==0, % Extend msg='Extension Error'; flag = false; return; end msg=''; flag=true; %-------------------------------- % Check 1st Line %-------------------------------- line_01=textread(filename,'%s%*[^\n]',2,'whitespace',''''); flag = strcmp(line_01{1},'[DEVICE]')&strcmp(line_01{2},'DEVICE=OEG17APD'); if flag==false, msg='1,2 Line is not OEG17APD_Header'; end return; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function str =getFileInfo(filename) % ** get Information of file ** % Syntax: % str = % str : File Infromation. % Cell array of string. % filename : Full-Path of the File. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% str=textread(filename,'%s',32,'headerlines',0,'delimiter','='); str =[[' Format OEG17APD : ' filename]; cellstr(str)]; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [hdata, data] =Execute(filename) % ** execute ** % Syntax: % [hdata, data] = preproOEG17APD('Execute', filename) % Continuous Data. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% global mType; data =ExecuteOEG(filename); [data,hdata]=ot2ucdata(data); hdata.Pos.ver=2.0; if mType==1, %2x6 hdata.Pos.D2.P=[8,40;14,46;14,34;20,40;26,46;26,34;32,40;38,46;38,34;44,40;50,46;50,34;56,40;62,46;62,34;68,40;]; hdata.Pos.Group.ChData={1:16}; hdata.Pos.Group.mode=-1; hdata.Pos.Group.OriginalCh=[1:16]; elseif mType==2 %3x4 hdata.Pos.D2.P=[14,46;14,34;20,52;20,40;20,28;26,46;26,34;32,52;32,40;32,28;38,46;38,34;44,52;44,40;44,28;50,46;50,34;]; hdata.Pos.Group.ChData={1:17}; hdata.Pos.Group.mode=-1; hdata.Pos.Group.OriginalCh=[1:17]; elseif mType==3 %3x4W hdata.Pos.D2.P=[3,46;3,34;9,52;9,40;9,28;15,46;15,34;21,52;21,40;21,28;27,46;27,34;33,52;33,40;33,28;39,46;39,34;... 48,46;48,34;54,52;54,40;54,28;60,46;60,34;66,52;66,40;66,28;72,46;72,34;78,52;78,40;78,28;84,46;84,34;]; hdata.Pos.Group.ChData={1:17,18:34}; hdata.Pos.Group.mode=[-1,-1]; hdata.Pos.Group.OriginalCh=[1:34]; elseif mType==4 %3x8 hdata.Pos.D2.P=[3,46;3,34;9,52;9,40;9,28;15,46;15,34;21,52;21,40;21,28;27,46;27,34;33,52;33,40;33,28;39,46;39,34;... 45,52;45,40;45,28;51,46;51,34;57,52;57,40;57,28;63,46;63,34;69,52;69,40;69,28;75,46;75,34;81,52;81,40;... 81,28;87,46;87,34;]; hdata.Pos.Group.ChData={1:37}; hdata.Pos.Group.mode=-1; hdata.Pos.Group.OriginalCh=[1:37]; elseif mType==5 %3x12 hdata.Pos.D2.P=[2.1,46;2.1,34;6.3,52;6.3,40;6.3,28;10.5,46;10.5,34;14.7,52;14.7,40;14.7,28;... 18.9,46;18.9,34;23.1,52;23.1,40;23.1,28;27.3,46;27.3,34;31.5,52;31.5,40;31.5,28;... 35.7,46;35.7,34;39.9,52;39.9,40;39.9,28;44.1,46;44.1,34;48.3,52;48.3,40;48.3,28;... 52.5,46;52.5,34;56.7,52;56.7,40;56.7,28;60.9,46;60.9,34;65.1,52;65.1,40;65.1,28;... 69.3,46;69.3,34;73.5,52;73.5,40;73.5,28;77.7,46;77.7,34;81.9,52;81.9,40;81.9,28;... 86.1,46;86.1,34;90.3,52;90.3,40;90.3,28;94.5,46;94.5,34;]; hdata.Pos.Group.ChData={1:57}; hdata.Pos.Group.mode=-1; hdata.Pos.Group.OriginalCh=[1:57]; elseif mType==6 %2x3W hdata.Pos.D2.P=[14,46;14,34;20,52;20,40;20,28;26,46;26,34;... %32,52;32,40;32,28; 38,46;38,34;44,52;44,40;44,28;50,46;50,34;]; hdata.Pos.Group.ChData={1:7,8:14}; hdata.Pos.Group.mode=[-1,-1]; hdata.Pos.Group.OriginalCh=[1:14]; elseif mType==7 %3x4Tri hdata.Pos.D2.P=[2.1,46;2.1,34;6.3,52;6.3,40;6.3,28;10.5,46;10.5,34;14.7,52;14.7,40;14.7,28;... 18.9,46;18.9,34;23.1,52;23.1,40;23.1,28;27.3,46;27.3,34;... %31.5,52;31.5,40;31.5,28;... 35.7,46;35.7,34;39.9,52;39.9,40;39.9,28;44.1,46;44.1,34;48.3,52;48.3,40;48.3,28;... 52.5,46;52.5,34;56.7,52;56.7,40;56.7,28;60.9,46;60.9,34;... %65.1,52;65.1,40;65.1,28;... 69.3,46;69.3,34;73.5,52;73.5,40;73.5,28;77.7,46;77.7,34;81.9,52;81.9,40;81.9,28;... 86.1,46;86.1,34;90.3,52;90.3,40;90.3,28;94.5,46;94.5,34;]; hdata.Pos.Group.ChData={1:17,18:34,35:51}; hdata.Pos.Group.mode=[-1,-1,-1]; hdata.Pos.Group.OriginalCh=[1:51]; elseif mType==8 %2x12 hdata.Pos.D2.P=[1.4,40;5.6,46;5.6,34;9.8,40;14.0,46;14.0,34;18.2,40;22.4,46;22.4,34;... 26.6,40;30.8,46;30.8,34;35.0,40;39.2,46;39.2,34;43.4,40;... 47.6,46;47.6,34;51.8,40;56.0,46;56.0,34;60.2,40;64.4,46;64.4,34;68.6,40;72.8,46;... 72.8,34;77.0,40;81.2,46;81.2,34;85.4,40;89.6,46;89.6,34;93.8,40;]; hdata.Pos.Group.ChData={1:34}; hdata.Pos.Group.mode=-1; hdata.Pos.Group.OriginalCh=[1:34]; %-----4x6-------------------- elseif mType==9 %4x6 hdata.Pos.D2.P=[14,34;26,34;38,34;50,34;62,34;... 8,40;20,40;32,40;44,40;56,40;68,40;... 14,46;26,46;38,46;50,46;62,46;... 8,52;20,52;32,52;44,52;56,52;68,52;... 14,58;26,58;38,58;50,58;62,58;... 8,64;20,64;32,64;44,64;56,64;68,64;... 14,70;26,70;38,70;50,70;62,70;]; hdata.Pos.Group.ChData={1:38}; hdata.Pos.Group.mode=-1; hdata.Pos.Group.OriginalCh=[1:38]; %-----6x4-------------------- elseif mType==10 %6x4 hdata.Pos.D2.P=[14,64;14,52;14,40;14,28;14,16;... 20,70;20,58;20,46;20,34;20,22;20,10;... 26,64;26,52;26,40;26,28;26,16;... 32,70;32,58;32,46;32,34;32,22;32,10;... 38,64;38,52;38,40;38,28;38,16;... 44,70;44,58;44,46;44,34;44,22;44,10;... 50,64;50,52;50,40;50,28;50,16;]; hdata.Pos.Group.ChData={1:38}; hdata.Pos.Group.mode=-1; hdata.Pos.Group.OriginalCh=[1:38]; %-----2x6+2x3W--------------- elseif mType==11 %2x6+2x3W hdata.Pos.D2.P=[8,40;14,46;14,34;20,40;26,46;26,34;32,40;38,46;38,34;44,40;50,46;50,34;56,40;62,46;62,34;68,40;... %2x6 14+6,46+30;14+6,34+30;20+6,52+30;20+6,40+30;20+6,28+30;26+6,46+30;26+6,34+30;... %2x3W 38+6,46+30;38+6,34+30;44+6,52+30;44+6,40+30;44+6,28+30;50+6,46+30;50+6,34+30;]; hdata.Pos.Group.ChData={1:16,17:23,24:30}; hdata.Pos.Group.mode=[-1,-1,-1]; hdata.Pos.Group.OriginalCh=[1:33]; %-----2x6+2x6---------------- elseif mType==12 %2x6+2x6 hdata.Pos.D2.P=[8,40;14,46;14,34;20,40;26,46;26,34;32,40;38,46;38,34;44,40;50,46;50,34;56,40;62,46;62,34;68,40;... %2x6 8,40+20;14,46+20;14,34+20;20,40+20;26,46+20;26,34+20;32,40+20;38,46+20;38,34+20;44,40+20;50,46+20;... %2x6 50,34+20;56,40+20;62,46+20;62,34+20;68,40+20;]; hdata.Pos.Group.ChData={1:16,17:32}; hdata.Pos.Group.mode=[-1,-1]; hdata.Pos.Group.OriginalCh=[1:32]; %-----2x6+3x4---------------- elseif mType==13 %2x6+3x4 hdata.Pos.D2.P=[8,40;14,46;14,34;20,40;26,46;26,34;32,40;38,46;38,34;44,40;50,46;50,34;56,40;62,46;62,34;68,40;... %2x6 14+6,46+30;14+6,34+30;20+6,52+30;20+6,40+30;20+6,28+30;26+6,46+30;26+6,34+30;32+6,52+30;32+6,40+30;32+6,28+30;38+6,46+30;... %3x4 38+6,34+30;44+6,52+30;44+6,40+30;44+6,28+30;50+6,46+30;50+6,34+30;]; hdata.Pos.Group.ChData={1:16,17:33}; hdata.Pos.Group.mode=[-1,-1]; hdata.Pos.Group.OriginalCh=[1:33]; %-----2x6+3x8----------------- elseif mType==14 %2x6+3x8 hdata.Pos.D2.P=[8+6,40;14+6,46;14+6,34;20+6,40;26+6,46;26+6,34;32+6,40;38+6,46;38+6,34;44+6,40;50+6,46;50+6,34;... 56+6,40;62+6,46;62+6,34;68+6,40;... %2x6 3,46+30;3,34+30;9,52+30;9,40+30;9,28+30;15,46+30;15,34+30;21,52+30;21,40+30;21,28+30;27,46+30;... %3x8 27,34+30;33,52+30;33,40+30;33,28+30;39,46+30;39,34+30;... 45,52+30;45,40+30;45,28+30;51,46+30;51,34+30;57,52+30;57,40+30;57,28+30;63,46+30;63,34+30;... 69,52+30;69,40+30;69,28+30;75,46+30;75,34+30;81,52+30;81,40+30;... 81,28+30;87,46+30;87,34+30;]; hdata.Pos.Group.ChData={1:16,17:53}; hdata.Pos.Group.mode=[-1,-1]; hdata.Pos.Group.OriginalCh=[1:53]; %-----2x6+4x6----------------- elseif mType==15 %2x6+4x6 hdata.Pos.D2.P=[8,40;14,46;14,34;20,40;26,46;26,34;32,40;38,46;38,34;44,40;50,46;50,34;56,40;62,46;62,34;68,40;... %2x6 14,34+30;26,34+30;38,34+30;50,34+30;62,34+30;... %4x6 8,40+30;20,40+30;32,40+30;44,40+30;56,40+30;68,40+30;... 14,46+30;26,46+30;38,46+30;50,46+30;62,46+30;... 8,52+30;20,52+30;32,52+30;44,52+30;56,52+30;68,52+30;... 14,58+30;26,58+30;38,58+30;50,58+30;62,58+30;... 8,64+30;20,64+30;32,64+30;44,64+30;56,64+30;68,64+30;... 14,70+30;26,70+30;38,70+30;50,70+30;62,70+30;]; hdata.Pos.Group.ChData={1:16,17:54}; hdata.Pos.Group.mode=[-1,-1]; hdata.Pos.Group.OriginalCh=[1:54]; %-----2x6+6x4------------------ elseif mType==16 %2x6+6x4 hdata.Pos.D2.P=[8,40;14,46;14,34;20,40;26,46;26,34;32,40;38,46;38,34;44,40;50,46;50,34;56,40;62,46;62,34;68,40;... %2x6 14+6,64+50;14+6,52+50;14+6,40+50;14+6,28+50;14+6,16+50;... 20+6,70+50;20+6,58+50;20+6,46+50;20+6,34+50;20+6,22+50;20+6,10+50;... %6x4 26+6,64+50;26+6,52+50;26+6,40+50;26+6,28+50;26+6,16+50;... 32+6,70+50;32+6,58+50;32+6,46+50;32+6,34+50;32+6,22+50;32+6,10+50;... 38+6,64+50;38+6,52+50;38+6,40+50;38+6,28+50;38+6,16+50;... 44+6,70+50;44+6,58+50;44+6,46+50;44+6,34+50;44+6,22+50;44+6,10+50;... 50+6,64+50;50+6,52+50;50+6,40+50;50+6,28+50;50+6,16+50;]; hdata.Pos.Group.ChData={1:16,17:54}; hdata.Pos.Group.mode=[-1,-1]; hdata.Pos.Group.OriginalCh=[1:54]; end hdata.Pos.D3.P=[],hdata.Pos.D3.Base=[]; return; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function OT_LOCAL_DATA =ExecuteOEG(filename) % OT_LOCAL_DATA = preproOEG17APD('ExecuteOEG', filename) % OT_LOCAL_DATA : Version 1.0 Inner Data-Format. % Thsi will be removed %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% global mType; [pathname, fname, ext] = fileparts(filename); FORMAT_VER=2.0; [dum]=textread(filename,'%s',2,'headerlines',10,'delimiter','='); ofst=0; if strcmp(dum{1},'Measure_Type'), ofst=1; end; % Mode definition for OEG17APD switch dum{2}, case '2x6' %{'3x3','3x3x2'}, measmode=-1,mType=1,chcnt=16,adn=chcnt*2,dtcnt=66; case '3x4' measmode=-1,mType=2,chcnt=17,adn=chcnt*2,dtcnt=66; case '3x4W' measmode=-1,mType=3,chcnt=34,adn=chcnt*2,dtcnt=132; case '3x8' measmode=-1,mType=4,chcnt=37,adn=chcnt*2,dtcnt=132; case '3x12' measmode=-1,mType=5,chcnt=57,adn=chcnt*2,dtcnt=198; case '2x3W' measmode=-1,mType=6,chcnt=17,adn=chcnt*2-3*2,dtcnt=66; case '3x4Tri' measmode=-1,mType=7,chcnt=57,adn=chcnt*2-6*2,dtcnt=198; case '2x12' measmode=-1,mType=8,chcnt=34,adn=chcnt*2,dtcnt=132; case '4x6' measmode=-1,mType=9,chcnt=38,adn=chcnt*2,dtcnt=132; case '6x4' measmode=-1,mType=10,chcnt=38,adn=chcnt*2,dtcnt=132; case '2x6+2x3W' measmode=-1,mType=11,chcnt=33,adn=chcnt*2-3*2,dtcnt=132; case '2x6+2x6' measmode=-1,mType=12,chcnt=32,adn=chcnt*2,dtcnt=132; case '2x6+3x4' measmode=-1,mType=13,chcnt=33,adn=chcnt*2,dtcnt=132; case '2x6+3x8' measmode=-1,mType=14,chcnt=53,adn=chcnt*2,dtcnt=198; case '2x6+4x6' measmode=-1,mType=15,chcnt=54,adn=chcnt*2,dtcnt=198; case '2x6+6x4' measmode=-1,mType=16,chcnt=54,adn=chcnt*2,dtcnt=198; otherwise measmode=99; end chnum=adn/2; opmode=99; plnum=1; adnmpn=1:adn; for i=1:adn adrng(i)=2.50; % A/D gain of each channel 2.50[V] end soft_version=2.0 dum=textread(filename, '%*2c%s',1, 'headerlines',19,'delimiter','='); id=dum{1}; dum=textread(filename, '%*4c%s',1, 'headerlines',18,'delimiter','='); subjectname=dum{1}; dum=textread(filename, '%*7c%s',1, 'headerlines',8,'delimiter','='); comment=dum{1}; age_str= textread(filename, '%*3c%s',1, 'headerlines',20, .... 'delimiter','='); tmp=age_str{1}; age(1)=str2double(tmp); for ii=2:4 age(ii)=0; end sex_str=textread(filename, '%*6c%s',1, 'headerlines',21, ... 'delimiter','='); switch(sex_str{1}) case 'Male', sex=0; case 'Female', sex=1; end date=textread(filename, '%*5c%s',1, 'headerlines',4,'delimiter','='); for i=1:adn if rem(i,2)==1,in_per_num=840.0;else in_per_num=770.0;end wlen(i)=in_per_num; end for i=1:adn amprng(i)=1.0; end %load digital gain to each channel for i=1:adn d_gain(i)=1.0; end %load sampling period[s] smpl_period_s=textread(filename, '%*12c%s',1, 'headerlines',9,'delimiter','='); %Fast/Fine if strcmpi(smpl_period_s,{'Fast'})==1 ,smpl_period=0.08192;else smpl_period=0.65536;end % Stimulation Information [dum]=textread(filename,'%s',2,'headerlines',12,'delimiter','='); if strcmpi(dum{2},'Event-Related') StimMode = 1; % Event-Related else StimMode = 2; % Block %load stim time end %load repeart count repeat=textread(filename, '%*12c%d',1, 'headerlines',16, ... 'delimiter','='); %load data % read all row as number of data [dum4] = textread(filename, '%4c%*[^\n]','headerlines',41); datanum=length(dum4); %データ数 evth=hex2dec(dum4);%'00xx'-->dec for i=1:datanum, evt=evth(i);%xxyy evt1=evt/256;%xx if bitand(evt,1)==1,evtn=1; elseif bitand(evt,2)==2, evtn=2; elseif bitand(evt,4)==4, evtn=3; elseif bitand(evt,8)==8, evtn=4; elseif bitand(evt,16)==16, evtn=5; else evtn=0; end if evt1>0 , if (evt1>=100)&(evt1<=109),evtn=0; elseif (evt1>=1)&(evt1<=49),evtn=7; elseif (evt1>=50)&(evt1<=99),evtn=8; else evtn=9; end end evth(i)=evtn; end clear dum4; chcfg0 = textread(filename, '%s',chcnt,'headerlines',37,'delimiter',','); %CH_CONFIG {'5'} {'7'}... chcfg='' l=length(chcfg0); j=1; for i=1:l if str2num(chcfg0{i})~=0,chcfg{j}=chcfg0{i},j=j+1;end end chcfg=chcfg'; chcnt=length(chcfg); cht=''; for i=1:dtcnt, cht=[cht {'%*f,'}];end %dtcnt=66/132/198 {'%*f,'}....{'%*f,'} cht{dtcnt}='%*f'; for i=1:chcnt, %i:論理CH ii=str2num(chcfg{i}); %ii:物理CH if ii<=24,pch=ii,dn=0; elseif ii<=48,pch=ii-24,dn=66; else pch=ii-48,dn=132; end cht{pch*2+dn}='%f,'; cht{pch*2+dn+1}='%f,'; end cht{1}='%*x,'; st=cell2mat(cht); %NEW fid=fopen(filename); try % for i=1:41,fgetl(fid);end %1-41:読み飛ばし f=fgetl(fid); %Probe1,CH1(),CH1(),... data_mark0=fscanf(fid,st,[chcnt*2, datanum]); catch fclose(fid); rethrow(lasterror); end fclose(fid); for i=1:chcnt ii=str2num(chcfg{i}); a(ii)=i; end; l=length(a); b=0; j=1; for i=1:l aa=a(i); if aa>0,b(aa)=j,j=j+1;end end for i=1:chcnt ii=b(i);%ii:物理CH data_mark(i*2-1,:)=data_mark0(ii*2-1,:); data_mark(i*2,:)=data_mark0(ii*2,:); end; data=data_mark'; %転置(縦=dtanum方向,横=CH方向) stim=evth; time=[0:smpl_period:(datanum-1)*smpl_period]; % convert sec to msec smpl_period=1000*smpl_period; % Make OT_LOCAL_DATA from file data. SCRIPT_OTDATALOAD; return;