📄 lcst.m
字号:
% handles empty - handles not created until after all CreateFcns called% Hint: popupmenu controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','blue');endset(hObject, 'String', {'lanchester线性律', 'lanchester平方律', });%选择菜单的设计function red1_Callback(hObject, eventdata, handles)% hObject handle to red1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of red1 as text% str2double(get(hObject,'String')) returns contents of red1 as a double% --- Executes during object creation, after setting all properties.function red1_CreateFcn(hObject, eventdata, handles)% hObject handle to red1 (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction red2_Callback(hObject, eventdata, handles)% hObject handle to red2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of red2 as text% str2double(get(hObject,'String')) returns contents of red2 as a double% --- Executes during object creation, after setting all properties.function red2_CreateFcn(hObject, eventdata, handles)% hObject handle to red2 (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction blue1_Callback(hObject, eventdata, handles)% hObject handle to blue1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of blue1 as text% str2double(get(hObject,'String')) returns contents of blue1 as a double% --- Executes during object creation, after setting all properties.function blue1_CreateFcn(hObject, eventdata, handles)% hObject handle to blue1 (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction blue2_Callback(hObject, eventdata, handles)% hObject handle to blue2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of blue2 as text% str2double(get(hObject,'String')) returns contents of blue2 as a double% --- Executes during object creation, after setting all properties.function blue2_CreateFcn(hObject, eventdata, handles)% hObject handle to blue2 (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction winp_Callback(hObject, eventdata, handles)% hObject handle to winp (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of winp as text% str2double(get(hObject,'String')) returns contents of winp as a double% --- Executes during object creation, after setting all properties.function winp_CreateFcn(hObject, eventdata, handles)% hObject handle to winp (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction endt_Callback(hObject, eventdata, handles)% hObject handle to endt (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of endt as text% str2double(get(hObject,'String')) returns contents of endt as a double% --- Executes during object creation, after setting all properties.function endt_CreateFcn(hObject, eventdata, handles)% hObject handle to endt (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction redr_Callback(hObject, eventdata, handles)% hObject handle to redr (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of redr as text% str2double(get(hObject,'String')) returns contents of redr as a double% --- Executes during object creation, after setting all properties.function redr_CreateFcn(hObject, eventdata, handles)% hObject handle to redr (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction bluer_Callback(hObject, eventdata, handles)% hObject handle to bluer (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of bluer as text% str2double(get(hObject,'String')) returns contents of bluer as a double% --- Executes during object creation, after setting all properties.function bluer_CreateFcn(hObject, eventdata, handles)% hObject handle to bluer (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction turnpoint_Callback(hObject, eventdata, handles)% hObject handle to turnpoint (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of turnpoint as text% str2double(get(hObject,'String')) returns contents of turnpoint as a double% --- Executes during object creation, after setting all properties.function turnpoint_CreateFcn(hObject, eventdata, handles)% hObject handle to turnpoint (see GCBO)% 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --- Executes on button press in close.function close_Callback(hObject, eventdata, handles)% hObject handle to close (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hint: get(hObject,'Value') returns toggle state of closeselection = questdlg(['Close ' get(handles.figure1,'Name') '?'],... ['Close ' get(handles.figure1,'Name') '...'],... 'Yes','No','Yes');if strcmp(selection,'No') return;enddelete(handles.figure1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -