📄 nu.asv
字号:
% Hint: get(hObject,'Value') returns toggle state of statif (get(hObject,'Value') == get(hObject,'Max')) set(handles.func,'visible','off'); set(handles.statformula,'visible','on');else set(handles.statformula,'visible','off'); set(handles.func,'visible','on'); set(handles.s1,'visible','off'); set(handles.s2,'visible','off'); set(handles.sigma,'visible','off'); set(handles.alpha,'visible','off'); set(handles.beta,'visible','off'); set(handles.lambda,'visible','off'); set(handles.samp,'visible','off');end% --- Executes during object creation, after setting all properties.function statformula_CreateFcn(hObject, eventdata, handles)% hObject handle to statformula (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 set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on selection change in statformula.function statformula_Callback(hObject, eventdata, handles)% hObject handle to statformula (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 statformula contents as cell array% contents{get(hObject,'Value')} returns selected item from statformulaval = get(handles.statformula,'Value');switch valcase 1 %Normal distribution% set(handles.func,'string','(1/sqrt(2.*pi.*s2.^2)).*exp(-((x-s1).^2)/(2.*s2.^2))'); set(handles.s1,'visible','on'); set(handles.s2,'visible','on'); set(handles.mu,'visible','on'); set(handles.sigma,'visible','on'); set(handles.alpha,'visible','off'); set(handles.beta,'visible','off'); set(handles.lambda,'visible','off'); set(handles.samp,'visible','off');case 2 %Gamma distribution% set(handles.func,'string','(x.^(s1-1).*exp(-x/s2))/(s2.*gamma(s1))'); set(handles.s1,'visible','on'); set(handles.s2,'visible','on'); set(handles.mu,'visible','off'); set(handles.sigma,'visible','off'); set(handles.alpha,'visible','on'); set(handles.beta,'visible','on'); set(handles.lambda,'visible','off'); set(handles.samp,'visible','off');case 3 %Exponential distribution% set(handles.func,'string','s1.*exp(-s1.*x)'); set(handles.s1,'visible','on'); set(handles.s2,'visible','off'); set(handles.mu,'visible','off'); set(handles.sigma,'visible','off'); set(handles.alpha,'visible','off'); set(handles.beta,'visible','off'); set(handles.lambda,'visible','on'); set(handles.samp,'visible','off');case 4 %t-distribution% set(handles.func,' set(handles.s1,'visible','on'); set(handles.s2,'visible','off'); set(handles.mu,'visible','off'); set(handles.sigma,'visible','off'); set(handles.alpha,'visible','off'); set(handles.beta,'visible','off'); set(handles.lambda,'visible','off'); set(handles.samp,'visible','on');case 5 %chi squared-distribution% set(handles.s1,'visible','on'); set(handles.s2,'visible','off'); set(handles.mu,'visible','off'); set(handles.sigma,'visible','off'); set(handles.alpha,'visible','off'); set(handles.beta,'visible','off'); set(handles.lambda,'visible','off'); set(handles.samp,'visible','on');end% --- Executes during object creation, after setting all properties.function Mu_Callback(hObject, eventdata, handles)% hObject handle to Mu (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 Mu as text% str2double(get(hObject,'String')) returns contents of Mu as a double% --- Executes during object creation, after setting all properties.function Sigma_CreateFcn(hObject, eventdata, handles)% hObject handle to Sigma (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 set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction Sigma_Callback(hObject, eventdata, handles)% hObject handle to Sigma (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 Sigma as text% str2double(get(hObject,'String')) returns contents of Sigma as a double% --- Executes during object creation, after setting all properties.function Alpha_CreateFcn(hObject, eventdata, handles)% hObject handle to Alpha (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 set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction Alpha_Callback(hObject, eventdata, handles)% hObject handle to Alpha (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 Alpha as text% str2double(get(hObject,'String')) returns contents of Alpha as a double% --- Executes during object creation, after setting all properties.function Beta_CreateFcn(hObject, eventdata, handles)% hObject handle to Beta (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 set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction Beta_Callback(hObject, eventdata, handles)% hObject handle to Beta (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 Beta as text% str2double(get(hObject,'String')) returns contents of Beta as a double% --- Executes during object creation, after setting all properties.function Lambda_CreateFcn(hObject, eventdata, handles)% hObject handle to Lambda (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 set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction Lambda_Callback(hObject, eventdata, handles)% hObject handle to Lambda (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 Lambda as text% str2double(get(hObject,'String')) returns contents of Lambda as a double% --- Executes during object creation, after setting all properties.function s1_CreateFcn(hObject, eventdata, handles)% hObject handle to s1 (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 set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction s1_Callback(hObject, eventdata, handles)% hObject handle to s1 (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 s1 as text% str2double(get(hObject,'String')) returns contents of s1 as a double% --- Executes during object creation, after setting all properties.function s2_CreateFcn(hObject, eventdata, handles)% hObject handle to s2 (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 set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction s2_Callback(hObject, eventdata, handles)% hObject handle to s2 (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 s2 as text% str2double(get(hObject,'String')) returns contents of s2 as a double
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -