亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rlocusgui.m

?? 在Matlab中可用的根軌跡圖例子源碼
?? M
?? 第 1 頁 / 共 2 頁
字號:
function varargout = RLocusGui(varargin)
% RLocusGui M-file for RLocusGui.fig
%
% Proper syntax for calling the function is RLocusGui(sys), where "sys"
% is a transfer function object (this requires the control-systems
% toolbox.)
%
% The function take the transfer function and and plots the root locus
% (using Matlab's "rlocus" command.  It then describes and illustrates
% all of the "textbook" rules for plotting the root locus.  It also creates
% a web page that demonstrates all of the rules.
%
% It was created using "GUIDE," Matlab's GUI creation tool.
%
%Written by Erik Cheever (Copyright 2007)
%Contact: erik_cheever@swarthmore.edu
% Erik Cheever
% Dept. of Engineering
% Swarthmore College
% 500 College Avenue
% Swarthmore, PA 19081  USA

% Last Modified by GUIDE v2.5 12-Feb-2007 12:43:57

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
   'gui_Singleton',  gui_Singleton, ...
   'gui_OpeningFcn', @RLocusGui_OpeningFcn, ...
   'gui_OutputFcn',  @RLocusGui_OutputFcn, ...
   'gui_LayoutFcn',  [] , ...
   'gui_Callback',   []);
if nargin && ischar(varargin{1})
   gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
   [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
   gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


%% The code below is split into several "cells."  (See MatLab docs).------
% The next cell contains all of the code that Matlab's GUIDE created that
% was not modified, and is empty.
%
% This is followed by initialization code.
%
% This is followed by utility functions that are called by several
% other functions.  This section also includes code that runs GUI.
%
% This is followed by the code that generates the web page html.
%
% The last cell includes all of the code that describes the "Root Locus
% Rules"
%-------------------------------------------------------------------------


%% Empty Matlab code (no comments) ---------------------------------------
% --- Outputs from this function are returned to the command line.
function varargout = RLocusGui_OutputFcn(hObject, eventdata, handles)
%Empty function (no output arguments)

% --- Executes on selection change in lbRuleDescr.
function lbRuleDescr_Callback(hObject, eventdata, handles)

% --- Executes during object creation, after setting all properties.
function lbRuleDescr_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'),...
      get(0,'defaultUicontrolBackgroundColor'))
   set(hObject,'BackgroundColor','white');
end

% --- Executes during object creation, after setting all properties.
function sldKIndex_CreateFcn(hObject, eventdata, handles)
if isequal(get(hObject,'BackgroundColor'), ...
      get(0,'defaultUicontrolBackgroundColor'))
   set(hObject,'BackgroundColor',[.9 .9 .9]);
end
%-------------------------------------------------------------------------


%% Initialization code
% --- Executes just before RLocusGui is made visible. --------------------
% This function makes sure inputs are appropriate, and
% also determines fundamental information about transfer
% function (order of numerator and denominator polynomials...).
function RLocusGui_OpeningFcn(hObject, eventdata, handles, varargin)
%The first time the code is called, it is slow to start up, so display
% a "waitbar" dialog.
hWait=waitbar(0.1,'Please wait while GUI initializes.');
nargin=length(varargin);
%Make sure we have one argument, and that it is a 'tf'
if (nargin~=1) || (~isa(varargin{1},'tf'))
   disp(' ');
   disp('Root Locus Plotter - proper usage is ''RLocusGui(Sys)'',')
   disp('  where ''Sys'' is a transfer function object.');
   disp(' '); disp(' ');
   close(handles.RLocusGuiFig);
   close(hWait);
   return
end
disp(' '); disp(' ');

Sys=minreal(varargin{1});   %Get minimum realization.
% Get numerator and denominator of two realizations.  If their
% lengths are unequal, it means that there were poles and zeros that
% cancelled.
[n1,d1]=tfdata(Sys,'v');
[n2,d2]=tfdata(varargin{1},'v');
if (length(n1)~=length(n2)),
   disp('***************************Warning*****************************');
   disp('Original transfer function was:');
   varargin{1}
   disp('Some poles and zeros were equal.  After cancellation:');
   Sys
   disp('The simplified transfer function is the one that will be used.');
   disp('**************************************************************');
   disp(' ');
   beep;
   s{1}='System has poles and zeros that cancel.';
   s{2}='See command window for details.';
   waitfor(warndlg(s));
end
handles.Sys=Sys;    %The variable Sys is the transfer function.

% Choose default command line output for RLocusGui.
% This was generated by Matlab, but is never used
handles.output = hObject;

handles.ColorOrder=get(gca,'ColorOrder');  %Save color order;
handles.HighlightColor=[1 0.75 0.75];      %Color for highlights (pink).
waitbar(0.25);
guidata(hObject, handles);      % Save changes to handle.
getSysInfo(hObject, handles);   % Get useful information about Xfer func.
handles=guidata(hObject);       % Reload handles (changed in getTFInfor)
waitbar(0.5);
InitRlocus(handles);
waitbar(0.75);
set(handles.rbInfo,'Value',1);   %Choose first radio button.
%Display it as the "SelectedObject"
set(handles.panelChooseRule,'SelectedObject',handles.rbInfo)
set(handles.lbRuleDescr,'String',RuleInfo(handles));
set(handles.axRules,'Visible','off');  %Hide second plot.
set(handles.txtKval,'Visible','off');  %Hide text on plot.
set(handles.sldKIndex,'visible','off');%Hide slider.
set(handles.txtKeq0,'visible','off');  %Hide "K=0" text for slider.
set(handles.txtKeqInf,'visible','off');%Hide "K=Inf" text for slider.
set(handles.cbInteract,'visible','off');%Hide Checkbox.
% This next variable is a kludge.  For the last two "rules," the user can
% interact with the GUI.  This is distinct from the others, and I needed
% a way to keep track of this.  If interaction is ongoing, the variable is
% set to 1.  Normally it will be 0.
handles.interactive=0;
handles.kInd=0;   %Index into array of gain (K) values.

RLocusDispTF(handles);      % Disp Xfer function

guidata(hObject, handles);  % Update handles structure
waitbar(1.0);
close(hWait);
% ------------------------------------------------------------------------


% ------------------------------------------------------------------------
function RLocusDispTF(handles)
% This function displays a tranfer function that is a helper function.
% It takes the transfer function of the and splits it
% into three lines so that it can be displayed nicely.  For example:
% "            s + 1"
% "H(s) = ---------------"
% "        s^2 + 2 s + 1"
% The numerator string is in the variable nStr,
% the second line is in divStr,
% and the denominator string is in dStr.

% Get numerator and denominator.
[n,d]=tfdata(handles.Sys,'v');
% Get string representations of numerator and denominator
nStr=poly2str(n,'s');  dStr=poly2str(d,'s');
% Find length of strings.
LnStr=length(nStr);  LdStr=length(dStr);

if LnStr>LdStr,
   %the numerator is longer than denominator string, so pad denominator.
   n=LnStr;                  %n is the length of the longer string.
   nStr=['        ' nStr];   %add spaces for characters at start of divStr.
   dStr=['        ' blanks(floor((LnStr-LdStr)/n)) dStr]; %pad denominator.
else
   %the demoninator is longer than numerator, pad numerator.
   n=LdStr;
   nStr=['        ' blanks(floor((LdStr-LnStr)/n)) nStr];
   dStr=['        ' dStr];
end

divStr='G(s)H(s)= ';
for i=1:n,  divStr=[divStr '-']; end
set(handles.txtXfer,'String',{nStr,divStr,dStr});
%Change type font and size.
set(handles.txtXfer,'FontName','Courier New')
set(handles.txtXfer,'FontSize',8)

guidata(handles.RLocusGuiFig, handles);  %save changes to handles.
% ------------------End of function RLocusDispTF -------------------------


% ------This function gets all of the information from transfer function.-
function getSysInfo(hObject, handles)
sys=handles.Sys;
[num,den]=tfdata(sys,'v'); %Get (and save) numerator and denominator.
handles.Num=num; handles.Den=den;
[z,p]=zpkdata(sys,'v');  %Get zeros and poles (to accuracy of 0.01)
z=round(real(z)*100)/100+j*round(imag(z)*100)/100;
p=round(real(p)*100)/100+j*round(imag(p)*100)/100;
realZIndex=find(abs(imag(z))<1E-3); %Determine which are real (i.e., on
realPIndex=find(abs(imag(p))<1E-3); % the real axis)...
z(realZIndex)=real(z(realZIndex));  % and set imag part to zerp.
p(realPIndex)=real(p(realPIndex));
handles.Z=z; handles.P=p;  %Store zeros and poles.

m=length(z); n=length(p);  %Length of numerator and denominator.
q=n-m;                     %Number of zeros at infinity.
handles.M=m; handles.N=n; handles.Q=q; %Store values.

[r,k1]=rlocus(sys);  % Let Matlab calculate appropriate range for k
for i=1:(length(k1)-1), %Generate intermediate points (smoother plots)
   k(2*(i-1)+1)=k1(i);  %Take value of k, but also...
   k(2*i)=(k1(i)+k1(i+1))/2;   %generate new point between consecutive k's
end
[r,k]=rlocus(sys,k);       %Recalculate with finer sampling of k.
handles.R=r; handles.K=k;  %Save.

% Slider for "k" has stops at each value of "k."
set(handles.sldKIndex,'Max',length(k));
set(handles.sldKIndex,'Min',1);
set(handles.sldKIndex,'SliderStep',[1/length(k) 2/length(k)]);
set(handles.sldKIndex,'Value',1);

% Get information for autoscaling.  This is largely a kludge.  Determine
% the min and max value of the axes as a multiple ("scale") of the min and
% max values of the zeros and poles of the transfer function.
scale=1.5;
if ~isempty(z),
   rlPzMin=min(min(real(p)),min(real(z)))*scale;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产入口| 99精品视频一区| 欧美一卡二卡在线观看| 水蜜桃久久夜色精品一区的特点| 在线观看一区不卡| 天堂午夜影视日韩欧美一区二区| 欧美久久一二区| 捆绑变态av一区二区三区 | 成人免费电影视频| 中文字幕一区二区三中文字幕| 成人高清视频免费观看| 亚洲卡通欧美制服中文| 欧美日韩国产成人在线免费| 久久精品99国产精品| 久久精品日韩一区二区三区| av成人老司机| 天堂蜜桃一区二区三区| 久久久久久夜精品精品免费| 成人国产精品视频| 亚洲综合一区二区| 日韩免费在线观看| 成人精品一区二区三区四区| 亚洲一区欧美一区| 久久这里都是精品| 91高清在线观看| 国精产品一区一区三区mba视频| 国产精品久久久久久久久搜平片| 日本精品裸体写真集在线观看| 日本视频在线一区| 国产精品午夜在线观看| 欧美情侣在线播放| 丁香婷婷综合色啪| 日韩av一二三| 欧美激情一区二区三区不卡| 欧美片网站yy| 成人免费的视频| 久久成人羞羞网站| 亚洲国产美女搞黄色| 久久综合一区二区| 欧美绝品在线观看成人午夜影视| 成人在线视频一区| 蜜臀久久久久久久| 亚洲曰韩产成在线| 国产精品天美传媒沈樵| 日韩一级大片在线| 欧美性猛交xxxxxx富婆| 国产不卡在线视频| 精品亚洲成a人| 亚洲高清免费观看| 亚洲天堂成人在线观看| wwwwww.欧美系列| 欧美精品粉嫩高潮一区二区| 一本一本大道香蕉久在线精品 | 精品国产亚洲在线| 欧美日韩国产成人在线91| 99久精品国产| 高清成人在线观看| 国产精品一区专区| 另类小说一区二区三区| 日日夜夜免费精品| 一区二区成人在线| 亚洲日本青草视频在线怡红院 | 亚洲国产精品精华液ab| 欧美大黄免费观看| 欧美一级黄色录像| 6080午夜不卡| 欧美久久一二三四区| 欧美性生活影院| 欧洲生活片亚洲生活在线观看| 成人av电影观看| 高清国产一区二区| 成人国产精品免费网站| 成人午夜精品一区二区三区| 国产成人8x视频一区二区| 国产九色sp调教91| 国产福利一区二区三区在线视频| 国产乱对白刺激视频不卡| 国内成+人亚洲+欧美+综合在线| 日本欧洲一区二区| 久久成人精品无人区| 精品中文字幕一区二区小辣椒| 麻豆高清免费国产一区| 久久精品国产精品亚洲红杏| 美女爽到高潮91| 国模少妇一区二区三区| 国产精品99久久久久久久vr| 成人午夜精品在线| 色播五月激情综合网| 欧美日韩一级视频| 日韩欧美成人一区二区| 26uuu久久天堂性欧美| 国产亚洲一区二区在线观看| 国产精品久久久一本精品 | 亚洲欧美aⅴ...| 一级精品视频在线观看宜春院| 亚洲国产欧美一区二区三区丁香婷| 亚洲高清免费视频| 激情伊人五月天久久综合| 国产69精品久久777的优势| 97久久久精品综合88久久| 在线观看www91| 日韩三级在线观看| 亚洲国产精品av| 一区二区三区不卡在线观看| 日日摸夜夜添夜夜添国产精品| 精品影院一区二区久久久| 成人avav影音| 欧美日韩国产首页| 久久午夜老司机| 樱桃视频在线观看一区| 久久国产免费看| 99热这里都是精品| 91精品免费在线观看| 久久这里只有精品视频网| 亚洲精品va在线观看| 裸体健美xxxx欧美裸体表演| 成人avav影音| 日韩一区二区电影在线| 国产日本欧美一区二区| 亚洲aⅴ怡春院| 国产成人av电影在线播放| 欧美日韩国产影片| 国产欧美日韩精品一区| 五月婷婷激情综合网| 懂色一区二区三区免费观看| 91久久人澡人人添人人爽欧美| 精品国产一区二区三区忘忧草 | 国产不卡免费视频| 欧美午夜在线一二页| 国产日产欧产精品推荐色| 日本午夜一区二区| 97国产一区二区| 精品国产免费一区二区三区四区| 亚洲色图.com| 国产精品亚洲午夜一区二区三区| 欧美日韩精品免费| 亚洲日本中文字幕区| 国产电影精品久久禁18| 91精品国产欧美一区二区| 亚洲精品乱码久久久久久黑人| 久久97超碰国产精品超碰| 欧美日韩一区三区四区| 国产精品卡一卡二卡三| 国产精品综合一区二区| 91麻豆精品国产91久久久久| 亚洲免费伊人电影| 成人性生交大片免费看在线播放| 精品国产一区二区三区四区四| 性久久久久久久久| 在线免费观看视频一区| 亚洲欧美电影一区二区| 成人开心网精品视频| 久久品道一品道久久精品| 六月丁香婷婷久久| 欧美一区在线视频| 爽好久久久欧美精品| 在线观看一区二区视频| 亚洲综合区在线| 色94色欧美sute亚洲13| 亚洲人成伊人成综合网小说| 成人av网站在线观看| 中文字幕人成不卡一区| av在线这里只有精品| 国产精品你懂的| 9人人澡人人爽人人精品| 久久久综合九色合综国产精品| 久久精品国产**网站演员| 日韩一区二区视频| 久久精品噜噜噜成人av农村| 日韩一区二区麻豆国产| 美国毛片一区二区三区| 精品国产区一区| 国产精品一区二区在线观看网站| 精品国产一区久久| 粉嫩av一区二区三区粉嫩| 国产欧美一区二区在线观看| 成人蜜臀av电影| 亚洲三级在线看| 欧美午夜在线一二页| 日本视频一区二区| 精品国产免费久久 | 日本不卡一二三| 日韩精品在线网站| 国产老肥熟一区二区三区| 国产精品久久久久久久午夜片 | 国产另类ts人妖一区二区| 国产欧美日韩在线视频| av一本久道久久综合久久鬼色| 亚洲欧美视频一区| 欧美电影影音先锋| 国产日韩av一区二区| 亚洲欧洲综合另类| 国产精品久久久久久福利一牛影视| 成人永久免费视频| 亚洲精选视频在线| 欧美精品 日韩| 国产成人精品一区二区三区四区| **网站欧美大片在线观看| 欧美精品xxxxbbbb| 国模无码大尺度一区二区三区|