0001 function job_plot_cmap_selvertex(inst_id)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 global vbmeg_inst;
0016
0017
0018
0019
0020
0021 rb = vbmeg_inst.plotcmap{inst_id}.model_type_original_rb;
0022 lb3 = vbmeg_inst.plotcmap{inst_id}.lb3;
0023 area_file = vbmeg_inst.plotcmap{inst_id}.area_file;
0024
0025
0026
0027
0028
0029 if get(rb,'Value'), V = vbmeg_inst.plotcmap{inst_id}.V;
0030 else V = vbmeg_inst.plotcmap{inst_id}.Vinf; end
0031
0032
0033
0034
0035
0036 k = waitforbuttonpress;
0037 if k~=0, return; end;
0038 p = (select3d)';
0039 if length(p)==0, return; end;
0040 tmp = repmat(p,[size(V,1) 1]);
0041 [tmp ixp] = min(sum((tmp-V).^2,2));
0042 vbmeg_inst.plotcmap{inst_id}.ix_peak = ixp;
0043
0044
0045
0046
0047
0048 if ~isempty(area_file),
0049 area_key = vb_get_keyset_area(area_file);
0050 area_key_list = [];
0051 n = 1;
0052
0053 for i=1:length(area_key)
0054 tmp = vb_get_area(area_file,area_key{i});
0055 if ~isempty(find(tmp.Iextract==ixp)),
0056 area_key_list{n} = tmp.key;
0057 n = n+1;
0058 end
0059
0060 set(lb3,'String',area_key_list);
0061 end
0062 end
0063
0064
0065
0066
0067
0068 job_plot_cmap_update_timecourse(inst_id);
0069 job_plot_cmap_update_spatialpattern(inst_id);