Home > functions > job > job_edit_act_dir > job_edit_act_average.m

job_edit_act_average

PURPOSE ^

Calculate average of activity values

SYNOPSIS ^

function job_edit_act_average(inst_id)

DESCRIPTION ^

 Calculate average of activity values

 --- Syntax
 job_edit_act_average(inst_id)

 --- History
 ????-??-?? Taku Yoshioka
 2008-09-04 Taku Yoshioka
 2009-05-01 Taku Yoshioka
  Debug for stacking operation

 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_average(inst_id)
0002 % Calculate average of activity values
0003 %
0004 % --- Syntax
0005 % job_edit_act_average(inst_id)
0006 %
0007 % --- History
0008 % ????-??-?? Taku Yoshioka
0009 % 2008-09-04 Taku Yoshioka
0010 % 2009-05-01 Taku Yoshioka
0011 %  Debug for stacking operation
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
0015 
0016 global vbmeg_inst; 
0017 if isempty(vbmeg_inst.editact{inst_id}.V), return; end
0018 if isempty(vbmeg_inst.editact{inst_id}.xxP), return; end
0019 
0020 %
0021 % Global variables
0022 %
0023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0024 lb1 = vbmeg_inst.editact{inst_id}.lb1; 
0025 actfile = vbmeg_inst.editact{inst_id}.actfile; 
0026 
0027 %
0028 % Calculate average
0029 %
0030 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0031 
0032 % Stack
0033 job_edit_act_stack(inst_id);
0034 xxP = vbmeg_inst.editact{inst_id}.xxP;
0035 
0036 % Get activity map
0037 i = get(lb1,'Value');
0038 keyset = get(lb1,'String');
0039 act = vb_get_act(actfile,keyset{i});
0040 
0041 % Average activity information
0042 xxP{1} = (xxP{2}+act.xxP)/2;
0043 vbmeg_inst.editact{inst_id}.xxP = xxP;
0044 
0045 %
0046 % Update plot
0047 %
0048 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0049 job_edit_act_update_spatialpattern(inst_id);

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