Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [item] = vb_input_settings_set_prop(item, property, value) 0002 % 0003 % Copyright (C) 2011, ATR All Rights Reserved. 0004 % License : New BSD License(see VBMEG_LICENSE.txt) 0005 0006 found = false; 0007 Nfield = length(item); 0008 0009 for k=1:Nfield 0010 if isstr(item{k}) && strcmpi(item{k}, property) 0011 item{k+1} = value; 0012 found = true; 0013 break; 0014 end 0015 end 0016 0017 if found == false 0018 item{Nfield+1} = property; 0019 item{Nfield+2} = value; 0020 end 0021 0022 if nargout ~= 1 0023 error('function caller should receive item'); 0024 end