function chkdef(handles,modes)

for j=1:14
    v=genvarname(['checkbox' num2str(j)]);
    vv=['handles.' v];
    eval(['set(' vv ',''Enable'',''off'')']);
    eval(['set(' vv ',''Value'',0)']);
end
for i=1:length(modes)
    v=genvarname(['checkbox' num2str(i)]);
    vv=['handles.' v];
    eval(['set(' vv ',''Enable'',''on'')']);
    eval(['set(' vv ',''Value'',1)']);
end