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
| function Parcours_Callback(hObject, eventdata, handles)
% Calcul de l'énergie à partir du parcours demandé.
% Conversion parcours/énergie
% cf. S:\ETUDIANTS\EC\Validation GTR\données_faisceau.xls
handles.Range = get(hObject,'String')
handles.ParcoursTemp = str2num(handles.Range);
% handles.Energie = 4.5907*handles.Parcours + 79.995;
handles.nozzleEnergie = -0.0353*handles.ParcoursTemp*handles.ParcoursTemp+6.3476*handles.ParcoursTemp+59.099;
set(handles.E,'visible','on');
strE = [num2str(handles.nozzleEnergie) ' ' 'MeV'];
set(handles.E,'String',strE);
guidata(hObject, handles);
% --- Executes during object creation, after setting all properties.
function Parcours_CreateFcn(hObject, eventdata, handles)
% hObject handle to Parcours (see GCBO)3
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
% --- Executes on button press in Bolus.
function Bolus_Callback(hObject, eventdata, handles)
% hObject handle to Bolus (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%Ouverture du fichier désiré
'test1'
handles.ParcoursTemp
'test1'
handles.Energie = -0.0353*handles.Parcours*handles.Parcours+6.3476*handles.Parcours+59.099; |
Partager