⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bysj.m

📁 我自己的毕业设计 软件部分 大家可以对GUI有个熟悉 加油
💻 M
📖 第 1 页 / 共 5 页
字号:
    cla reset;    painting_xiangpin_all_1();else    axes(handles.axes_fupin)    cla reset;    painting_fupin_all_2();    axes(handles.axes_xiangpin)    cla reset;    painting_xiangpin_all_2();end% calc_parameter();% calc_impedance();% --- Executes during object creation, after setting all properties.function slider_cf1_CreateFcn(hObject, eventdata, handles)% hObject    handle to slider_cf1 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: slider controls usually have a light gray background.if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor',[.9 .9 .9]);end% --- Executes on slider movement.function slider_att1_Callback(hObject, eventdata, handles)% hObject    handle to slider_att1 (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,'Value') returns position of slider%        get(hObject,'Min') and get(hObject,'Max') to determine range of sliderset(findobj('tag','slider_att1_value'),'string',num2str(get(hObject,'value')));global eelif eel == 1    axes(handles.axes_fupin)    cla reset;    painting_fupin_all_1();    axes(handles.axes_xiangpin)    cla reset;    painting_xiangpin_all_1();else    axes(handles.axes_fupin)    cla reset;    painting_fupin_all_2();    axes(handles.axes_xiangpin)    cla reset;    painting_xiangpin_all_2();end% calc_parameter();% calc_impedance();% --- Executes during object creation, after setting all properties.function slider_att1_CreateFcn(hObject, eventdata, handles)% hObject    handle to slider_att1 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: slider controls usually have a light gray background.if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor',[.9 .9 .9]);end% --- Executes on button press in cb_marker1.function cb_marker1_Callback(hObject, eventdata, handles)% hObject    handle to cb_marker1 (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 cb_marker1% --- Executes on button press in checkbox3.function checkbox3_Callback(hObject, eventdata, handles)% hObject    handle to checkbox3 (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 checkbox3% --- Executes on button press in rb_gridon_fupin.function rb_gridon_fupin_Callback(hObject, eventdata, handles)% hObject    handle to rb_gridon_fupin (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 rb_gridon_fupinif get(gcbo,'value')==1    set(findobj('tag','rb_gridoff_fupin'),'value',0);    axes(handles.axes_fupin);    grid onend% --- Executes on button press in rb_gridoff_fupin.function rb_gridoff_fupin_Callback(hObject, eventdata, handles)% hObject    handle to rb_gridoff_fupin (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 rb_gridoff_fupinif get(gcbo,'value')==1    set(findobj('tag','rb_gridon_fupin'),'value',0);    axes(handles.axes_fupin);    grid offend% --- Executes on button press in radiobutton3.function radiobutton3_Callback(hObject, eventdata, handles)% hObject    handle to radiobutton3 (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 radiobutton3% --- Executes on button press in radiobutton4.function radiobutton4_Callback(hObject, eventdata, handles)% hObject    handle to radiobutton4 (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 radiobutton4% --- Executes on button press in cb_marker2.function cb_marker2_Callback(hObject, eventdata, handles)% hObject    handle to cb_marker2 (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 cb_marker2% --- Executes on button press in checkbox6.function checkbox6_Callback(hObject, eventdata, handles)% hObject    handle to checkbox6 (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 checkbox6% --- Executes on button press in cb_marker3.function cb_marker3_Callback(hObject, eventdata, handles)% hObject    handle to cb_marker3 (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 cb_marker3state = get(hObject,'value');   %这里返回的是一个double                                % --- Executes on button press in cb_marker4.function cb_marker4_Callback(hObject, eventdata, handles)% hObject    handle to cb_marker4 (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 cb_marker4% --- Executes on button press in rb_gridon_xiangpin.function rb_gridon_xiangpin_Callback(hObject, eventdata, handles)% hObject    handle to rb_gridon_xiangpin (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 rb_gridon_xiangpinif get(gcbo,'value')==1    set(findobj('tag','rb_gridoff_xiangpin'),'value',0);    axes(handles.axes_xiangpin);    grid onend% --- Executes on button press in rb_gridoff_xiangpin.function rb_gridoff_xiangpin_Callback(hObject, eventdata, handles)% hObject    handle to rb_gridoff_xiangpin (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 rb_gridoff_xiangpinif get(gcbo,'value')==1    set(findobj('tag','rb_gridon_xiangpin'),'value',0);    axes(handles.axes_xiangpin);    grid offend% --- Executes on slider movement.function slider_cf2_Callback(hObject, eventdata, handles)% hObject    handle to slider_cf2 (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,'Value') returns position of slider%        get(hObject,'Min') and get(hObject,'Max') to determine range of sliderset(findobj('tag','slider_cf2_value'),'string',num2str(get(hObject,'value')));axes(handles.axes_fupin)cla reset;painting_fupin_all_2();axes(handles.axes_xiangpin)cla reset;painting_xiangpin_all_2();% calc_parameter();% calc_impedance();% --- Executes during object creation, after setting all properties.function slider_cf2_CreateFcn(hObject, eventdata, handles)% hObject    handle to slider_cf2 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: slider controls usually have a light gray background.if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor',[.9 .9 .9]);end% --- Executes on slider movement.function slider_att2_Callback(hObject, eventdata, handles)% hObject    handle to slider_att2 (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,'Value') returns position of slider%        get(hObject,'Min') and get(hObject,'Max') to determine range of sliderset(findobj('tag','slider_att2_value'),'string',num2str(get(hObject,'value')));axes(handles.axes_fupin)cla reset;painting_fupin_all_2();axes(handles.axes_xiangpin)cla reset;painting_xiangpin_all_2();% calc_parameter();% calc_impedance();% --- Executes during object creation, after setting all properties.function slider_att2_CreateFcn(hObject, eventdata, handles)% hObject    handle to slider_att2 (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: slider controls usually have a light gray background.if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))    set(hObject,'BackgroundColor',[.9 .9 .9]);end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%edit_slider_cf1_startfunction edit_slider_cf1_start_Callback(hObject, eventdata, handles)% hObject    handle to edit_slider_cf1_start (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 edit_slider_cf1_start as text_phase_diff%        str2double(get(hObject,'String')) returns contents of edit_slider_cf1_start as a doubleset(findobj('tag','slider_cf1'),'min',str2num(get(hObject,'string')));% --- Executes during object creation, after setting all properties.function edit_slider_cf1_start_CreateFcn(hObject, eventdata, handles)% hObject    handle to edit_slider_cf1_start (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%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%edit_slider_cf1_end-----------测试改动function edit_slider_cf1_end_Callback(hObject, eventdata, handles)% hObject    handle to edit_slider_cf1_end (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 edit_slider_cf1_end as text_phase_diff%        str2double(get(hObject,'String')) returns contents of edit_slider_cf1_end as a doubleset(findobj('tag','slider_cf1'),'Max',str2num(get(hObject,'string')));%%%%%%%%%%%%%%%%%%%%%%%%%%%测试代码%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% cf1_current = get(findobj('tag','slider_cf1'),'value');% temp = str2num(get(hObject,'string'));% max_prior = get(findobj('tag','slider_cf1'),'Max');% set(findobj('tag','slider_cf1'),'Max',temp);% max_xiugai = get(findobj('tag','slider_cf1'),'Max');% error_max = get(findobj('tag','slider_cf1'),'Max');% error_value = get(findobj('tag','slider_cf1'),'value');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -