0001
0002
0003 mask_equil = find(status.fluct == 2);
0004
0005 for it = 1:length(mask_equil),
0006 if isempty(fluctparams{mask_equil(it)}) && isfield(equils{mask_equil(it)},'fluct'),
0007 equils{mask_equil(it)} = rmfield(equils{mask_equil(it)},'fluct');
0008 elseif ~isempty(fluctparams{mask_equil(it)}),
0009 equils{mask_equil(it)}.fluct = fluctstruct_yp(equils{mask_equil(it)},fluctparams{mask_equil(it)}.id,struct('naequilp',fluctparams{mask_equil(it)}));
0010 clear fluct
0011 end
0012 end
0013 status.fluct(mask_equil) = 1;
0014
0015 if curtime > 0,
0016
0017 if status.fluct(curtime) < 0,
0018 lukeobj.fluct.load.state = 'off';
0019 else
0020 lukeobj.fluct.load.state = 'on';
0021 end
0022
0023 if status.fluct(curtime) <= 0,
0024 lukeobj.fluct.modify.state = 'off';
0025 lukeobj.fluct.save.state = 'off';
0026 lukeobj.fluct.reset.state = 'off';
0027 lukeobj.fluct.clear.state = 'off';
0028
0029 lukeobj.fluct.text.string = '< empty >';
0030
0031 lukeobj.luke.fluct.state = 'off';
0032 lukeobj.luke.fluct.highlight = false;
0033 else
0034 lukeobj.fluct.modify.state = 'on';
0035 lukeobj.fluct.save.state = 'on';
0036 if isfield(fluctparams{curtime},'orig')
0037 lukeobj.fluct.reset.state = 'on';
0038 else
0039 lukeobj.fluct.reset.state = 'off';
0040 end
0041 lukeobj.fluct.clear.state = 'on';
0042
0043 lukeobj.fluct.text.string = fluctparams{curtime}.id;
0044
0045 backup_file = [workdir,filesep,'backup_',make_luke_simulid_jd(equils{curtime},ohms{curtime},transpfastes{curtime},ripples{curtime},wavess{curtime}),'.mat'];
0046
0047 if exist(backup_file,'file')
0048 lukeobj.luke.fluct.state = 'on';
0049 lukeobj.luke.fluct.highlight = true;
0050 if status.output(curtime) == 0,
0051 lukeobj.luke.text.string = 'backup file exists';
0052 end
0053 else
0054 lukeobj.luke.fluct.state = 'off';
0055 lukeobj.luke.fluct.highlight = false;
0056 end
0057
0058 clear backup_file
0059
0060 end
0061
0062 else
0063
0064 lukeobj.luke.fluct.state = 'off';
0065 lukeobj.luke.fluct.highlight = false;
0066
0067 if all(status.fluct < 0),
0068 lukeobj.fluct.load.state = 'off';
0069 else
0070 lukeobj.fluct.load.state = 'on';
0071 end
0072
0073 if all(status.fluct <= 0),
0074 lukeobj.fluct.modify.state = 'off';
0075 lukeobj.fluct.save.state = 'off';
0076 lukeobj.fluct.reset.state = 'off';
0077 lukeobj.fluct.clear.state = 'off';
0078
0079 lukeobj.fluct.text.string = '< empty >';
0080 else
0081 if any(status.fluct < 1),
0082
0083 comptest = false;
0084
0085 else
0086
0087 comptest = true;
0088
0089 for it = 2:ntimes,
0090 comptest = comptest && comp_struct_jd(fluctparams{1},fluctparams{it},0);
0091 end
0092 end
0093
0094 if comptest,
0095 lukeobj.fluct.modify.state = 'on';
0096 lukeobj.fluct.save.state = 'on';
0097 lukeobj.fluct.clear.state = 'on';
0098
0099 if isfield(fluctparams{1},'orig'),
0100 lukeobj.fluct.reset.state = 'on';
0101 else
0102 lukeobj.fluct.reset.state = 'off';
0103 end
0104
0105 lukeobj.fluct.text.string = fluctparams{1}.id;
0106
0107 else
0108 lukeobj.fluct.modify.state = 'off';
0109 lukeobj.fluct.save.state = 'off';
0110 lukeobj.fluct.clear.state = 'off';
0111 lukeobj.fluct.reset.state = 'off';
0112 lukeobj.transp.text.string = '< time specific >';
0113 end
0114 end
0115
0116 clear mask_equil it comptest
0117 end
0118