




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、Cqjz.mfunction num,den=cqjz(G,kc,yPm)G=tf(G);mag,pha,w=bode(G*kc);Mag=20*log10(mag);Gm,Pm,Wcg,Wcp=margin(G*kc);%phi=(yPm-getfield(Pm,'Wcg')*pi/180;phi=(yPm+5-Pm)*pi/180;alpha=(1+sin(phi)/(1-sin(phi);Mn=-10*log10(alpha);Wcgn=spline(Mag,w,Mn);T=1/(Wcgn*sqrt(alpha);Tz=alpha*T;num=Tz,1;den=T,1;k
2、eshe.mfunction varargout = keshe(varargin)% KESHE M- keshe.fig% KESHE, by itself, creates a new KESHE or raises the existing% singleton*.% H = KESHE returns the handle to a new KESHE or the handle to% the existing singleton*.% KESHE('CALLBACK',hObject,eventData,handles,.) calls the local% fu
3、nction named CALLBACK in KESHE.M with the given input arguments.% KESHE('Property','Value',.) creates a new KESHE or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before keshe_OpeningFunction gets called. An% unrecognized proper
4、ty name or invalid value makes property application% stop. All inputs are passed to keshe_OpeningFcn via varargin.% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one% instance to run (singleton)".% See also: GUIDE, GUIDATA, GUIHANDLES % Copyright 2002-2003 The MathWor
5、ks, Inc. % Edit the above text to modify the response to help keshe % Last Modified by GUIDE v2.5 30-Dec-2009 18:31:42 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', m, . 'gui_Singleton', gui_Singleton, . 'gui_OpeningFcn', keshe_Open
6、ingFcn, . 'gui_OutputFcn', keshe_OutputFcn, . 'gui_LayoutFcn', , . 'gui_Callback', );if nargin && ischar(varargin1) gui_State.gui_Callback = str2func(varargin1);end if nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:
7、);end% End initialization code - DO NOT EDIT % - Executes just before keshe is made visible.function keshe_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB%
8、handles structure with handles and user data (see GUIDATA)% varargin command line arguments to keshe (see VARARGIN) % Choose default command line output for keshehandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes keshe wait for user response (see UIRESUME)%
9、 uiwait(handles.figure1); % - Outputs from this function are returned to the command line.function varargout = keshe_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future vers
10、ion of MATLAB% handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structurevarargout1 = handles.output; % - Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GC
11、BO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)figure(2)bode(handles.numh,handles.denh);xlabel('Frequency rad/s','fontsize',10);ylabel('Phase deg Gain dB','fontsize',10);title('Bode
12、Diagram of original signal');guidata(hObject,handles); % - Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles)% hObject handle to pushbutton2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handle
13、s and user data (see GUIDATA)figure(1)bode(conv(handles.num,handles.fnum),conv(handles.den,handles.fden);xlabel('Frequency rad/s','fontsize',10);ylabel('Phase deg Gain dB','fontsize',10);title('Bode Diagram of original signal');guidata(hObject,handles); functi
14、on 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(hO
15、bject,'String') returns contents of edit1 as a% double_num=get(hObject,'String');handles.num=str2num(num);guidata(hObject, handles); % - Executes during object creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject handle to edit1 (see G
16、CBO)% 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 s
17、et(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUID
18、ATA) % Hints: get(hObject,'String') returns contents of edit2 as text% str2double(get(hObject,'String') returns contents of edit2 as a% doubleden=get(hObject,'String');handles.den=str2num(den);guidata(hObject, handles); % - Executes during object creation, after setting all p
19、roperties.function edit2_CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (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 Window
20、s.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit3_Callback(hObject, eventdata, handles)% hObject handle to edit3 (see GCBO)% eventdata reserved - to b
21、e defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit3 as text% str2double(get(hObject,'String') returns contents of edit3 as a double % - Executes during object creation, after sett
22、ing all properties.function edit3_CreateFcn(hObject, eventdata, handles)% hObject handle to edit3 (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
23、on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit4_Callback(hObject, eventdata, handles)% hObject handle to edit4 (see GCBO)% eventdata reserv
24、ed - 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 text% str2double(get(hObject,'String') returns contents of edit4 as a double % - Executes during object creation, a
25、fter 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 ba
26、ckground on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit6_Callback(hObject, eventdata, handles)% hObject handle to edit6 (see GCBO)% eventda
27、ta 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 edit6 as text% str2double(get(hObject,'String') returns contents of edit6 as a doublepm=get(hObject,'String'
28、;);handles.pm=str2num(pm);guidata(hObject, handles); % - Executes during object creation, after setting all properties.function edit6_CreateFcn(hObject, eventdata, handles)% hObject handle to edit6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles
29、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');end functi
30、on edit7_Callback(hObject, eventdata, handles)% hObject handle to edit7 (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 edit7 as text% str2double(get(hO
31、bject,'String') returns contents of edit7 as a doublek=get(hObject,'String');handles.k=str2num(k);guidata(hObject, handles); % - Executes during object creation, after setting all properties.function edit7_CreateFcn(hObject, eventdata, handles)% hObject handle to edit7 (see GCBO)% ev
32、entdata 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(hObje
33、ct,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit8_Callback(hObject, eventdata, handles)% hObject handle to edit8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % H
34、ints: get(hObject,'String') returns contents of edit8 as text% str2double(get(hObject,'String') returns contents of edit8 as a double % - Executes during object creation, after setting all properties.function edit8_CreateFcn(hObject, eventdata, handles)% hObject handle to edit8 (see
35、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
36、set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit9_Callback(hObject, eventdata, handles)% hObject handle to edit9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUI
37、DATA) % Hints: get(hObject,'String') returns contents of edit9 as text% str2double(get(hObject,'String') returns contents of edit9 as a double % - Executes during object creation, after setting all properties.function edit9_CreateFcn(hObject, eventdata, handles)% hObject handle to ed
38、it9 (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
39、9;);else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit10_Callback(hObject, eventdata, handles)% hObject handle to edit10 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user da
40、ta (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit10 as text% str2double(get(hObject,'String') returns contents of edit10 as a double % - Executes during object creation, after setting all properties.function edit10_CreateFcn(hObject, eventdata, handles)% hObjec
41、t handle to edit10 (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'
42、;,'white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit11_Callback(hObject, eventdata, handles)% hObject handle to edit11 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with hand
43、les and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit11 as text% str2double(get(hObject,'String') returns contents of edit11 as a double % - Executes during object creation, after setting all properties.function edit11_CreateFcn(hObject, eventdata, h
44、andles)% hObject handle to edit11 (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,'Back
45、groundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit12_Callback(hObject, eventdata, handles)% hObject handle to edit12 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles stru
46、cture with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit12 as text% str2double(get(hObject,'String') returns contents of edit12 as a double % - Executes during object creation, after setting all properties.function edit12_CreateFcn(hObjec
47、t, eventdata, handles)% hObject handle to edit12 (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(hO
48、bject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit13_Callback(hObject, eventdata, handles)% hObject handle to edit13 (see GCBO)% eventdata reserved - to be defined in a future version of MATLA
49、B% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit13 as text% str2double(get(hObject,'String') returns contents of edit13 as a double % - Executes during object creation, after setting all properties.function edit13_C
50、reateFcn(hObject, eventdata, handles)% hObject handle to edit13 (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
51、.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit14_Callback(hObject, eventdata, handles)% hObject handle to edit14 (see GCBO)% eventdata reserved - to be defined in a future v
52、ersion of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit14 as text% str2double(get(hObject,'String') returns contents of edit14 as a double % - Executes during object creation, after setting all properties.fu
53、nction edit14_CreateFcn(hObject, eventdata, handles)% hObject handle to edit14 (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 IS
54、PC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end function edit15_Callback(hObject, eventdata, handles)% hObject handle to edit15 (see GCBO)% eventdata reserved - to be define
55、d in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit15 as text% str2double(get(hObject,'String') returns contents of edit15 as a double % - Executes during object creation, after setting al
56、l properties.function edit15_CreateFcn(hObject, eventdata, handles)% hObject handle to edit15 (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');end % - Executes during object creation, after setting all properties.function te
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 專利使用許可合同范本
- 外賣承運合同范本
- ppp總包合同范本
- 買賣鮑魚合同范本
- 出售工程潔具合同范本
- 人才引進股權(quán)激勵合同范本
- 分期合同與框架合同范本
- ppp合同范本 政府
- 鄉(xiāng)鎮(zhèn)建設(shè)用地合同范本
- 出軌賠償合同范本
- Q∕GDW 12067-2020 高壓電纜及通道防火技術(shù)規(guī)范
- 汽車系統(tǒng)動力學(xué)-輪胎動力學(xué)
- 《經(jīng)濟研究方法論》課程教學(xué)大綱
- 10T每天生活污水處理設(shè)計方案
- 中國民航國內(nèi)航空匯編航路314系列航線
- 山西特色文化簡介(課堂PPT)
- 電飯煲的智能控制系統(tǒng)設(shè)計
- 一元二次方程100道計算題練習(xí)(附答案)
- 儲罐玻璃鋼內(nèi)防腐
- 2013-2015北京地鐵部分線路年客流量
- 機械設(shè)計說明書
評論
0/150
提交評論