sys=tf(num,den; [y,t]=step(sys; plot(t,y; grid on ;
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles % hObject handle to pushbutton3 (see GCBO
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA close(gcbf;
function edit1_Callback(hObject, eventdata, handles % hObject handle to edit1 (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 edit1 as text % str2double(get(hObject,'String' returns contents of edit1 as a double % --- Executes during object creation, after setting all properties. function edit1_CreateFcn(hObject, eventdata, handles
% hObject handle to edit1 (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 pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles % hObject handle to pushbutton4 (see GCBO
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA
num = str2num(get(handles.edit1,'String' ; den = str2num(get(handles.edit2,'String' ; finalvalue = polyval(num,0/polyval(den,0 sys=tf(num,den; [Kc,p]=rlocfind(sys; set(handles.Kc,'string' ,Kc; X = real(p(1 Y = imag(p(1
set(handles.Xpoint,'string' ,num2str(X; set(handles.Ypoint,'string' ,num2str(Y; damp=sqrt(X(1,1^2/(X(1,1^2+Y(1,1^2; Wn=abs(X(1,1/damp; Tp=pi/(Wn*sqrt(1-damp^2;
overshoot=exp(-pi*damp/sqrt(1-damp^2; Ts=3/(damp*Wn; deviation=Wn^2;
set(handles.overshoot,'string' ,num2str(overshoot; set(handles.Ts,'string' ,Ts; set(handles.Tp,'string' ,Tp;
set(handles.Wn,'string' ,num2str(Wn; set(handles.damp,'string' ,num2str(damp; set(handles.deviation,'string' ,deviation;
function edit2_Callback(hObject, eventdata, handles % hObject handle to edit1 (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 edit1 as text
% str2double(get(hObject,'String' returns contents of edit1 as a double % --- Executes during object creation, after setting all properties. function edit2_CreateFcn(hObject, eventdata, handles
% hObject handle to edit1 (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 pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles % hObject handle to pushbutton5 (see GCBO
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA
num = str2num(get(handles.edit1,'String' ; den = str2num(get(handles.edit2,'String' ; sys=tf(num,den
rltool(sys;%à?ó?1¤??μ÷???????÷2?êyê1???-1y?÷μ???μ? function edit4_Callback(hObject, eventdata, handles % hObject handle to edit4 (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 edit4 as textw'q % str2double(get(hObject,'String' returns contents of edit4 as a double
% --- Executes during object creation, after setting all properties. function edit4_CreateFcn(hObject, eventdata, handles
% hObject handle to edit4 (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 pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles