📄 ksstringexpo.m
字号:
val = abs(val); end set(hObject,'String',num2str(val));% --- Executes during object creation, after setting all properties.function amplitude_text_CreateFcn(hObject, eventdata, handles)% hObject handle to amplitude_text (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 excitepos_text_Callback(hObject, eventdata, handles)% hObject handle to excitepos_text (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 excitepos_text as text% str2double(get(hObject,'String')) returns contents of excitepos_text as a double val = str2num(get(hObject,'String')); if (val > 0.99) val = 0.99; elseif (val < 0.01) val = 0.01; end set(hObject,'String',num2str(val));% --- Executes during object creation, after setting all properties.function excitepos_text_CreateFcn(hObject, eventdata, handles)% hObject handle to excitepos_text (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 pickups_text_Callback(hObject, eventdata, handles)% hObject handle to pickups_text (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 pickups_text as text% str2double(get(hObject,'String')) returns contents of pickups_text as a double % Check to see if valid positions for pickups_text [0.01, 0.99] val = get(hObject,'String'); val = str2num(val); for i=1:size(val,2) if val(i) < 0.01 val(i) = 0.01; elseif val(i) > 0.99 val(i) = 0.99; end end % Remove duplicates newval = []; for i=1:size(val,2) a = find(val==val(i)); newval = [newval val(i)];% if length(a) ~= 1% val(a(end) = val();% end end newval = sort(newval); set(hObject,'String',num2str(newval));% --- Executes during object creation, after setting all properties.function pickups_text_CreateFcn(hObject, eventdata, handles)% hObject handle to pickups_text (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 synthesize.function synthesize_Callback(hObject, eventdata, handles)% hObject handle to synthesize (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) ksstringexpofn 'synthesize';% --------------------------------------------------------------------function fourierexpo_Callback(hObject, eventdata, handles)% hObject handle to fourierexpo (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) ksstringexpofn 'fourierexpo';% --------------------------------------------------------------------function sonoexpo_Callback(hObject, eventdata, handles)% hObject handle to sonoexpo (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) ksstringexpofn 'sonoexpo';% --------------------------------------------------------------------function Untitled_4_Callback(hObject, eventdata, handles)% hObject handle to Untitled_4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% --- Executes on selection change in instmenu.function instmenu_Callback(hObject, eventdata, handles)% hObject handle to instmenu (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = get(hObject,'String') returns instmenu contents as cell array% contents{get(hObject,'Value')} returns selected item from instmenu ksstringexpofn 'instmenu';% --- Executes during object creation, after setting all properties.function instmenu_CreateFcn(hObject, eventdata, handles)% hObject handle to instmenu (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% 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','white');end% --- Executes on selection change in roommenu.function roommenu_Callback(hObject, eventdata, handles)% hObject handle to roommenu (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = get(hObject,'String') returns roommenu contents as cell array% contents{get(hObject,'Value')} returns selected item from roommenu ksstringexpofn 'roommenu';% --- Executes during object creation, after setting all properties.function roommenu_CreateFcn(hObject, eventdata, handles)% hObject handle to roommenu (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% 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','white');end% --------------------------------------------------------------------function save_Callback(hObject, eventdata, handles)% hObject handle to save (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) ksstringexpofn 'save';function Fs_text_Callback(hObject, eventdata, handles)% hObject handle to Fs_text (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 Fs_text as text% str2double(get(hObject,'String')) returns contents of Fs_text as a double val = str2num(get(hObject,'String')); if (val < 0) val = 1; end set(hObject,'String',num2str(val));% --- Executes during object creation, after setting all properties.function Fs_text_CreateFcn(hObject, eventdata, handles)% hObject handle to Fs_text (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 duration_text_Callback(hObject, eventdata, handles)% hObject handle to duration_text (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 duration_text as text% str2double(get(hObject,'String')) returns contents of duration_text as a double val = str2num(get(hObject,'String')); if (val < 0) val = 0; end set(hObject,'String',num2str(val));% --- Executes during object creation, after setting all properties.function duration_text_CreateFcn(hObject, eventdata, handles)% hObject handle to duration_text (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 infobox_inst_Callback(hObject, eventdata, handles)% hObject handle to infobox_inst (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 infobox_inst as text% str2double(get(hObject,'String')) returns contents of infobox_inst as a double% --- Executes during object creation, after setting all properties.function infobox_inst_CreateFcn(hObject, eventdata, handles)% hObject handle to infobox_inst (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 infobox_room_Callback(hObject, eventdata, handles)% hObject handle to infobox_room (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 infobox_room as text% str2double(get(hObject,'String')) returns contents of infobox_room as a double% --- Executes during object creation, after setting all properties.function infobox_room_CreateFcn(hObject, eventdata, handles)% hObject handle to infobox_room (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');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -