📄 mfbox_rel_paramsweepg.m
字号:
function steps_Callback(hObject, eventdata, handles)set(hObject,'String',sprintf('%d',max(1,min(20,floor(str2double(get(hObject,'String')))))));guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function steps_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --- Executes on selection change in parameter1.function parameter1_Callback(hObject, eventdata, handles)contents = get(handles.parameter1,'String');handles.ppn1 = contents{get(handles.parameter1,'Value')};if (length(handles.ppn1)>0) handles.pptype1 = handles.pp.([handles.ppn1,'_type']); if (any(strcmp(handles.pptype1,{'float','int'}))) handles.ppmin1 = handles.pp.([handles.ppn1,'_min']); handles.ppmax1 = handles.pp.([handles.ppn1,'_max']); else handles.ppmin1 = 0; handles.ppmax1 = 1; endendrange_from1_Callback(handles.range_from1, eventdata, handles);range_to1_Callback(handles.range_to1, eventdata, handles);guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function parameter1_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --- Executes during object creation, after setting all properties.function range_from1_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --- Executes during object creation, after setting all properties.function range_to1_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction range_from2_Callback(hObject, eventdata, handles)val = str2double(get(hObject,'String'));max_val = str2double(get(handles.range_to2,'String'));val = min(val,max_val);val = min(handles.ppmax2,max(handles.ppmin2,val));if (strcmp(handles.pptype2,'int')) val = floor(val);elseif (strcmp(handles.pptype2,'float')) val = val;else val = handles.ppmin2;endset(hObject,'String',mat2str(val));guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function range_from2_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --- Executes on selection change in parameter2.function parameter2_Callback(hObject, eventdata, handles)contents = get(handles.parameter2,'String');handles.ppn2 = contents{get(handles.parameter2,'Value')};if (length(handles.ppn2)>0) handles.pptype2 = handles.pp.([handles.ppn2,'_type']); if (any(strcmp(handles.pptype2,{'float','int'}))) handles.ppmin2 = handles.pp.([handles.ppn2,'_min']); handles.ppmax2 = handles.pp.([handles.ppn2,'_max']); else handles.ppmin2 = 0; handles.ppmax2 = 1; endendrange_from2_Callback(handles.range_from2, eventdata, handles);range_to2_Callback(handles.range_to2, eventdata, handles);guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function parameter2_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction range_to2_Callback(hObject, eventdata, handles)val = str2double(get(hObject,'String'));min_val = str2double(get(handles.range_from2,'String'));val = max(val,min_val);val = min(handles.ppmax2,max(handles.ppmin2,val));if (strcmp(handles.pptype2,'int')) val = floor(val);elseif (strcmp(handles.pptype2,'float')) val = val;else val = handles.ppmax2;endset(hObject,'String',mat2str(val));guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function range_to2_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction range_from3_Callback(hObject, eventdata, handles)val = str2double(get(hObject,'String'));max_val = str2double(get(handles.range_to3,'String'));val = min(val,max_val);val = min(handles.ppmax3,max(handles.ppmin3,val));if (strcmp(handles.pptype3,'int')) val = floor(val);elseif (strcmp(handles.pptype3,'float')) val = val;else val = handles.ppmin3;endset(hObject,'String',mat2str(val));guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function range_from3_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --- Executes on selection change in parameter3.function parameter3_Callback(hObject, eventdata, handles)contents = get(handles.parameter3,'String');handles.ppn3 = contents{get(handles.parameter3,'Value')};if (length(handles.ppn3)>0) handles.pptype3 = handles.pp.([handles.ppn3,'_type']); if (any(strcmp(handles.pptype3,{'float','int'}))) handles.ppmin3 = handles.pp.([handles.ppn3,'_min']); handles.ppmax3 = handles.pp.([handles.ppn3,'_max']); else handles.ppmin3 = 0; handles.ppmax3 = 1; endendrange_from3_Callback(handles.range_from3, eventdata, handles);range_to3_Callback(handles.range_to3, eventdata, handles);guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function parameter3_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction range_to3_Callback(hObject, eventdata, handles)val = str2double(get(hObject,'String'));min_val = str2double(get(handles.range_from3,'String'));val = max(val,min_val);val = min(handles.ppmax3,max(handles.ppmin3,val));if (strcmp(handles.pptype3,'int')) val = floor(val);elseif (strcmp(handles.pptype3,'float')) val = val;else val = handles.ppmax3;endset(hObject,'String',mat2str(val));guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function range_to3_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --- Executes on selection change in sortby.function sortby_Callback(hObject, eventdata, handles)% --- Executes during object creation, after setting all properties.function sortby_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end% --- Executes on selection change in thresholdtype.function thresholdtype_Callback(hObject, eventdata, handles)t = get(handles.thresholdtype,'String');threshold_type = t{get(handles.thresholdtype,'Value')};switch threshold_type case 'none' set(handles.threshold,'Enable','off'); otherwise set(handles.threshold,'Enable','on');endguidata(hObject,handles);% --- Executes during object creation, after setting all properties.function thresholdtype_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction threshold_Callback(hObject, eventdata, handles)v = str2double(get(hObject,'String'));v = max(v,0);set(hObject,'String',sprintf('%1.4f',v));guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function threshold_CreateFcn(hObject, eventdata, handles)if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -