Get current time course for all of the vertices --- Syntax function J0 = job_plot_cmap_get_current(inst_id,ix_trial,tt) --- History ????-??-?? Taku Yoshioka 2008-08-28 Taku Yoshioka 2010-12-10 taku-y [minor] Modified to match with the new variable definitions. 2012-01-26 sako [minor change] n_trial -> "n_trial" was replaced to "ix_trial" Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function J0 = job_plot_cmap_get_current(inst_id,ix_trial,tt) 0002 % Get current time course for all of the vertices 0003 % 0004 % --- Syntax 0005 % function J0 = job_plot_cmap_get_current(inst_id,ix_trial,tt) 0006 % 0007 % --- History 0008 % ????-??-?? Taku Yoshioka 0009 % 2008-08-28 Taku Yoshioka 0010 % 2010-12-10 taku-y 0011 % [minor] Modified to match with the new variable definitions. 0012 % 2012-01-26 sako 0013 % [minor change] n_trial -> "n_trial" was replaced to "ix_trial" 0014 % 0015 % Copyright (C) 2011, ATR All Rights Reserved. 0016 % License : New BSD License(see VBMEG_LICENSE.txt) 0017 0018 global vbmeg_inst; 0019 if isempty(vbmeg_inst.plotcmap{inst_id}.V), J0 = []; return; end 0020 const = vb_define_verbose; 0021 VERBOSE_LEVEL_DEBUG = const.VERBOSE_LEVEL_DEBUG; 0022 0023 % 0024 % Global variables 0025 % 0026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0027 %ix_trial = vbmeg_inst.plotcmap{inst_id}.ix_trial; 0028 toi = vbmeg_inst.plotcmap{inst_id}.toi; 0029 Jinfo = vbmeg_inst.plotcmap{inst_id}.Jinfo; 0030 %ix_bck = vbmeg_inst.plotcmap{inst_id}.ix_bck; 0031 %rb1 = vbmeg_inst.plotcmap{inst_id}.rb1; 0032 %rb2 = vbmeg_inst.plotcmap{inst_id}.rb2; 0033 0034 if isempty(Jinfo), return; end 0035 0036 if isempty(tt), 0037 tt=1:size(vbmeg_inst.plotcmap{inst_id}.Jact(1,:),2); 0038 end 0039 0040 % 0041 % Current map 0042 % 0043 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0044 J0 = zeros(size(vbmeg_inst.plotcmap{inst_id}.V,1),length(tt)); 0045 0046 % Focal current 0047 %if get(rb1,'Value')==get(rb1,'Max'), 0048 0049 % Debug code 0050 if vb_get_verbose==VERBOSE_LEVEL_DEBUG, 0051 disp('--- job_plot_cmap_get_current'); 0052 fprintf('length(Jinfo.ix_act)=%d\n',length(Jinfo.ix_act)); 0053 fprintf('size(J0)\n'); 0054 size(J0) 0055 fprintf('size(Jact(:,tt))\n'); 0056 size(vbmeg_inst.plotcmap{inst_id}.Jact(:,tt)) 0057 disp('--- pause'); 0058 pause; 0059 end 0060 0061 ix_act_ex = Jinfo.ix_act_ex; 0062 0063 if size(vbmeg_inst.plotcmap{inst_id}.Jact, 3) > 1 0064 ix_trial = vbmeg_inst.plotcmap{inst_id}.ix_trial; 0065 J0(ix_act_ex,:) = J0(ix_act_ex,:) + ... 0066 vbmeg_inst.plotcmap{inst_id}.Jact(:,tt,ix_trial); 0067 else 0068 J0(ix_act_ex,:) = J0(ix_act_ex,:) + ... 0069 vbmeg_inst.plotcmap{inst_id}.Jact(:,tt); 0070 end 0071 0072 % Background current 0073 %if get(rb2,'Value')==get(rb2,'Max'), 0074 % J0(ix_bck,:) = J0(ix_bck,:) + ... 0075 % vbmeg_inst.plotcmap{inst_id}.Jbck(:,tt,ix_trial); 0076 %end