1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| function Log_Callback(hObject, eventdata, handles)
g=get(handles.Log,'value')
if (g~=1)
x=get(handles.Log,'String');
y=get(handles.Log,'value');
f=x{y};
if(strcmp(f,'Exchange between FT0 and FT1 "Boolean"'))
set_param('MAJ','SimulationCommand','stop');
stop(handles.t);
set(handles.Stop,'BackgroundColor', 'red');
data=load('FT1Exchange(1).mat');
h=fieldnames(data);
for k=1:size(h,1)
xlswrite('testFT1.xlsx',data.(h{k}),h{k})
end
winopen testFT1.xlsx
elseif(strcmp(f,'Exchange between FT0 and FT1 "Double"'))
set_param('MAJ','SimulationCommand','stop');
stop(handles.t);
set(handles.Stop,'BackgroundColor', 'red');
data=load('FT1Exchange(2).mat');
h=fieldnames(data);
for k=1:size(h,1)
xlswrite('testFT11.xlsx',data.(h{k}),h{k})
end
winopen testFT11.xlsx
end;
end; |
Partager