资源预览内容
第1页 / 共18页
第2页 / 共18页
第3页 / 共18页
第4页 / 共18页
第5页 / 共18页
第6页 / 共18页
第7页 / 共18页
第8页 / 共18页
第9页 / 共18页
第10页 / 共18页
亲,该文档总共18页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
(一) 主程序变量说明:输入变量:zo 传输线特性阻抗zl 传输线终端负载阻抗Er 传输线介电常数f 传输电磁波的频率由输入变量计算得出的变量:w 传输电磁波的数字角频率len 传输电磁波的相波长beita 相移常数gama 传输线个点反射系数复值gamal 传输线终端反射系数的模rou 驻波系数k 行波系数Zi 传输线各点输入阻抗的复值Ui 传输线各点输入电压的复值Uo 传输线各点输出电压的复值Uit 传输线各点输入电压的瞬时值Uot 传输线各点输出电压的瞬时值Ii 传输线各点输入电流的复值Io 传输线各点输出电流的复值Is 传输线各点合成电流的复值Us 传输线各点合成电压的复值Ist 传输线各点合成电流的瞬时值Ust 传输线各点合成电压的瞬时值ph 传输线各点合成电压的相位(二) 主程序流程说明:本程序的界面中共有三个输入编辑框,三个输出编辑框和五个波形显示窗口,分 别用来输入:传输线特性阻抗 Z0、传输线终端负载阻抗 ZL、传输的电磁波的频率 f、传输 线传输介质的相对介电常数 r;输出:传输线的终端反射系数 L、行波系数 、驻波系 数 K;具体的程序思路如下: 1.由输入编辑框获得用户输入的 Z0、ZL、f 和 r; 2.在“开始”按钮的 callback 函数中进行运算,并控制各个 axis 的显示; 3.图形的动态显示由一个 while 循环实现,并由全局标记变量 flag 控制; 4.在“停止”按钮的 callback 函数中令 flag = 1,while 循环跳出。 (三) 程序运行效果 1.行波演示 中端接匹配负载zo = zl = 502.驻波演示 1)终端短路zo = 50zl = 02)终端开路zo = 50zl = inf3)终端接纯电抗负载zo = 50zl = X * j3.行驻波演示(四) 主程序代码 function varargout = StatusAnaly(varargin)%*% % Copyright (C), 2009-2012,Lyric % % FileName: StatusAnaly.m % % Author: Lyric % % Version: 1.0 % % Date: 2010-05-11 % %*% STATUSANALY M-file for StatusAnaly.fig % STATUSANALY, by itself, creates a new STATUSANALY or raises the existing % singleton*. % % H = STATUSANALY returns the handle to a new STATUSANALY or the handle to % the existing singleton*. % % STATUSANALY(CALLBACK,hObject,eventData,handles,.) calls the local % function named CALLBACK in STATUSANALY.M with the given input arguments. % % STATUSANALY(Property,Value,.) creates a new STATUSANALY or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before StatusAnaly_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to StatusAnaly_OpeningFcn via varargin. % % *See GUI Options on GUIDEs Tools menu. Choose “GUI allows only one % instance to run (singleton)“. % % See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help StatusAnaly% Last Modified by GUIDE v2.5 11-May-2010 14:30:20% Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct(gui_Name, mfilename, .gui_Singleton, gui_Singleton, .gui_OpeningFcn, StatusAnaly_OpeningFcn, .gui_OutputFcn, StatusAnaly_OutputFcn, .gui_LayoutFcn, , .gui_Callback, ); if nargin endif nargoutvarargout1:nargout = gui_mainfcn(gui_State, varargin:); elsegui_mainfcn(gui_State, varargin:); end % End initialization code - DO NOT EDIT% - Executes just before StatusAnaly is made visible. function StatusAnaly_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 % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to StatusAnaly (see VARARGIN)% Choose default command line output for StatusAnaly handles.output = hObject;% Update handles structure guidata(hObject, handles);% UIWAIT makes StatusAnaly wait for user response (see UIRESUME) % uiwait(handles.figure1);% - Outputs from this function are returned to the command line.function varargout = StatusAnaly_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 version of MATLAB % handles structure with handles and user data (see GUIDATA)% Get default command line output from handles structure varargout1 = handles.output;function edit_zo_Callback(hObject, eventdata, handles) % hObject handle to edit_zo (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 edit_zo as text % str2double(get(hObject,String) returns contents of edit_zo as a double% - Executes during object creation, after setting all properties. function edit_zo_CreateFcn(hObject, eventdata, handles) % hObject handle to edit_zo (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 endfunction edit_zl_Callback(hObject, eventdata, handles) % hObject handle to edit_zl (see GCBO) % eventdata reserved - to be defined in a future version of MAT
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号