Home > vbmeg > functions > gui > preAnalysis > head > head_spm_curry > pa_head_merge_parm.m

pa_head_merge_parm

PURPOSE ^

merge head_parm which has head gui has and inputted head_parm fields.

SYNOPSIS ^

function pa_head_merge_parm(fig, merge_parm)

DESCRIPTION ^

 merge head_parm which has head gui has and inputted head_parm fields.
 [USAGE]
    pa_head_merge_parm(<fig> <,head_parm>);
 [IN]
           fig : figure handle of head parameter gui.
    merge_parm : To be merged head_parm.

 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 pa_head_merge_parm(fig, merge_parm)
0002 % merge head_parm which has head gui has and inputted head_parm fields.
0003 % [USAGE]
0004 %    pa_head_merge_parm(<fig> <,head_parm>);
0005 % [IN]
0006 %           fig : figure handle of head parameter gui.
0007 %    merge_parm : To be merged head_parm.
0008 %
0009 % Copyright (C) 2011, ATR All Rights Reserved.
0010 % License : New BSD License(see VBMEG_LICENSE.txt)
0011 
0012 %
0013 % --- Previous check
0014 %
0015 if ~exist('fig', 'var')|| isempty(fig) || ~ishandle(fig)
0016     error('invalid figure handle.');
0017 end
0018 if ~exist('merge_parm', 'var')
0019     error('merge_parm is a required parameter.');
0020 end
0021 
0022 %
0023 % --- Main Procedure
0024 %
0025 
0026 % load data
0027 data = guidata(fig);
0028 
0029 parm_names = fieldnames(merge_parm);
0030 for k=1:length(parm_names)
0031     data.head_parm.(parm_names{k}) = merge_parm.(parm_names{k});
0032 end
0033 
0034 % save data
0035 guidata(fig, data);
0036

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005