Home > functions > job > job_edit_act_dir > job_edit_act_replace.m

job_edit_act_replace

PURPOSE ^

Replace activity map with the selected one

SYNOPSIS ^

function job_edit_act_replace(inst_id)

DESCRIPTION ^

 Replace activity map with the selected one

 --- Syntax
 job_edit_act_replace(inst_id)

 --- History
 2009-05-01 Taku Yoshioka

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function job_edit_act_replace(inst_id)
0002 % Replace activity map with the selected one
0003 %
0004 % --- Syntax
0005 % job_edit_act_replace(inst_id)
0006 %
0007 % --- History
0008 % 2009-05-01 Taku Yoshioka
0009 %
0010 % Copyright (C) 2011, ATR All Rights Reserved.
0011 % License : New BSD License(see VBMEG_LICENSE.txt)
0012 
0013 global vbmeg_inst; 
0014 if isempty(vbmeg_inst.editact{inst_id}.V), return; end
0015 if isempty(vbmeg_inst.editact{inst_id}.xxP), return; end
0016 
0017 %
0018 % Global variables
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 lb1 = vbmeg_inst.editact{inst_id}.lb1; 
0022 actfile = vbmeg_inst.editact{inst_id}.actfile; 
0023 
0024 %
0025 % Calculate average
0026 %
0027 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0028 
0029 % Stack
0030 job_edit_act_stack(inst_id);
0031 xxP = vbmeg_inst.editact{inst_id}.xxP;
0032 
0033 % Get activity map
0034 i = get(lb1,'Value');
0035 keyset = get(lb1,'String');
0036 act = vb_get_act(actfile,keyset{i});
0037 
0038 % Replace activity map
0039 xxP{1} = act.xxP;
0040 vbmeg_inst.editact{inst_id}.xxP = xxP;
0041 
0042 %
0043 % Update plot
0044 %
0045 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0046 job_edit_act_update_spatialpattern(inst_id);

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005