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

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

?? sfunxy2.m

?? 神經網絡預測控制程序的源代碼
?? M
字號:
function [sys, x0, str, ts] = sfunxy2(t,x,u,flag,ax,varargin)
%SFUNXY2 S-function that acts as an X-(double Y) scope using MATLAB plotting functions.
%   This M-file is designed to be used in a Simulink S-function block.
%   It draws a line from the previous input point, which is stored using
%   discrete states, and the current point.  It then stores the current
%   point for use in the next invocation.
%
%   The first input works as the X variable and the last two inputs are the Y's
%   variables.
%
%   See also SFUNXYS, LORENZS, SFUNXY.

%   Copyright 1992-2002 The MathWorks, Inc.
%   $Revision: 1.3 $ $Date: 2002/04/14 21:12:17 $
%   Andrew Grace 5-30-91.
%   Revised Wes Wang 4-28-93, 8-17-93, 12-15-93
%   Revised Craig Santos 10-28-96
%   Revised Orlando De Jesus 1-25-00

switch flag

  %%%%%%%%%%%%%%%%%%
  % Initialization %
  %%%%%%%%%%%%%%%%%%
  case 0
    [sys,x0,str,ts] = mdlInitializeSizes(ax,varargin{:});
    SetBlockCallbacks(gcbh);

  %%%%%%%%%%
  % Update %
  %%%%%%%%%%
  case 2
    sys = mdlUpdate(t,x,u,flag,ax,varargin{:});

  %%%%%%%%%
  % Start %
  %%%%%%%%%
  case 'Start'
    LocalBlockStartFcn

  %%%%%%%%
  % Stop %
  %%%%%%%%
  case 'Stop'
    LocalBlockStopFcn

  %%%%%%%%%%%%%%
  % NameChange %
  %%%%%%%%%%%%%%
  case 'NameChange'
    LocalBlockNameChangeFcn

  %%%%%%%%%%%%%%%%%%%%%%%%
  % CopyBlock, LoadBlock %
  %%%%%%%%%%%%%%%%%%%%%%%%
  case { 'CopyBlock', 'LoadBlock' }
    LocalBlockLoadCopyFcn

  %%%%%%%%%%%%%%%
  % DeleteBlock %
  %%%%%%%%%%%%%%%
  case 'DeleteBlock'
    LocalBlockDeleteFcn

  %%%%%%%%%%%%%%%%
  % DeleteFigure %
  %%%%%%%%%%%%%%%%
  case 'DeleteFigure'
    LocalFigureDeleteFcn

  %%%%%%%%%%%%%%%%
  % Unused flags %
  %%%%%%%%%%%%%%%%
  case { 3, 9 }
    sys = [];

  %%%%%%%%%%%%%%%%%%%%
  % Unexpected flags %
  %%%%%%%%%%%%%%%%%%%%
  otherwise
    if ischar(flag),
      errmsg=sprintf('Unhandled flag: ''%s''', flag);
    else
      errmsg=sprintf('Unhandled flag: %d', flag);
    end

    error(errmsg);

end

% end sfunxy2

%
%=============================================================================
% mdlInitializeSizes
% Return the sizes, initial conditions, and sample times for the S-function.
%=============================================================================
%
function [sys,x0,str,ts] = mdlInitializeSizes(ax,varargin)

if length (ax)~=4
  error(['Axes limits must be defined.'])
end

sizes = simsizes;
sizes.NumContStates  = 0;
sizes.NumDiscStates  = 0;
sizes.NumOutputs     = 0;
sizes.NumInputs      = 3;
sizes.DirFeedthrough = 0;
sizes.NumSampleTimes = 1;

sys = simsizes(sizes);

x0 = [];

str = [];

%
% initialize the array of sample times, note that in earlier
% versions of this scope, a sample time was not one of the input
% arguments, the varargs checks for this and if not present, assigns
% the sample time to -1 (inherited)
%
if ~isempty(varargin) > 0
  ts = [varargin{1} 0];
else
  ts = [-1 0];
end

% end mdlInitializeSizes

%
%=============================================================================
% mdlUpdate
% Handle discrete state updates, sample time hits, and major time step
% requirements.
%=============================================================================
%
function sys=mdlUpdate(t,x,u,flag,ax,varargin)

%
% always return empty, there are no states...
%
sys = [];

%
% Locate the figure window associated with this block.  If it's not a valid
% handle (it may have been closed by the user), then return.
%
FigHandle=GetSfunXYFigure(gcbh);
if ~ishandle(FigHandle),
   return
end

%
% Get UserData of the figure.
%
ud = get(FigHandle,'UserData');
if isempty(ud.XData),
  x_data = [u(1) u(1)];
  y_data = [u(2) u(2)];
  y2_data = [u(3) u(3)];
else
  x_data = [ud.XData(end) u(1)];
  y_data = [ud.YData(end) u(2)];
  y2_data = [ud.Y2Data(end) u(3)];
end

ud.axislimits(2)=ax(1);
ud.axislimits(2)=max([ud.axislimits(2) ax(2)]);
aux=0;
if (u(1)> ud.axislimits(2))
  aux=ceil(u(1)/ud.axislimits(2));
  ud.axislimits(2)=ud.axislimits(2)*aux;
end
ud.axislimits(3)=min([ud.axislimits(3) ax(3)]);
aux2=min([y_data y2_data]);
if aux2<ud.axislimits(3)
  if aux2<0
    ud.axislimits(3)=-ceil(-aux2);
  else
    ud.axislimits(3)=fix(aux2);
  end
  aux=1;
end
ud.axislimits(4)=max([ud.axislimits(4) ax(4)]);
aux2=max([y_data y2_data]);
if aux2>ud.axislimits(4)
  if aux2<0
    ud.axislimits(4)=ceil(aux2);
  else
    ud.axislimits(4)=ceil(aux2);
  end
  aux=1;
end

% plot the input lines
set(ud.XYAxes, ...
    'Visible','on',...
    'Xlim', ud.axislimits(1:2),...
    'Ylim', ud.axislimits(3:4));
set(ud.XYLine(1),...
    'Xdata',x_data,...
    'Ydata',y_data,...
    'LineStyle','-');
set(ud.XYLine(2),...
    'Xdata',x_data,...
    'Ydata',y2_data,...
    'LineStyle','-');
set(ud.XYTitle,'String','X Y Plot');
set(FigHandle,'Color',get(FigHandle,'Color'));

%
% update the X/Y stored data points
%
ud.XData(end+1) = u(1);
ud.YData(end+1) = u(2);
ud.Y2Data(end+1) = u(3);

if aux~=0
  set(ud.XYLine(1),...
      'Xdata',ud.XData,...
      'Ydata',ud.YData,...
      'LineStyle','-');
  set(ud.XYLine(2),...
      'Xdata',ud.XData,...
      'Ydata',ud.Y2Data,...
      'LineStyle','-');
end

set(FigHandle,'UserData',ud);
drawnow

% end mdlUpdate

%
%=============================================================================
% LocalBlockStartFcn
% Function that is called when the simulation starts.  Initialize the
% XY Graph scope figure.
%=============================================================================
%
function LocalBlockStartFcn

%
% get the figure associated with this block, create a figure if it doesn't
% exist
%
FigHandle = GetSfunXYFigure(gcbh);
if ~ishandle(FigHandle),
  FigHandle = CreateSfunXYFigure;
else
  set(FigHandle,'Toolbar','none');
  set(FigHandle,'Menubar','none');
end

ud = get(FigHandle,'UserData');
set(ud.XYLine,'Erasemode','normal');
set(ud.XYLine,'XData',[],'YData',[],'XData',[],'YData',[]);
set(ud.XYLine,'XData',0,'YData',0,'XData',0,'YData',0,'Erasemode','none');
ud.XData = [];
ud.YData = [];
ud.Y2Data = [];
ud.axislimits = [0 0 Inf -Inf];
set(FigHandle,'UserData',ud);

% end LocalBlockStartFcn

%
%=============================================================================
% LocalBlockStopFcn
% At the end of the simulation, set the line's X and Y data to contain
% the complete set of points that were acquire during the simulation.
% Recall that during the simulation, the lines are only small segments from
% the last time step to the current one.
%=============================================================================
%
function LocalBlockStopFcn

FigHandle=GetSfunXYFigure(gcbh);
if ishandle(FigHandle),
  %
  % Get UserData of the figure.
  %
  ud = get(FigHandle,'UserData');
  set(ud.XYLine(1),...
      'Xdata',ud.XData,...
      'Ydata',ud.YData,...
      'LineStyle','-');
  set(ud.XYLine(2),...
      'Xdata',ud.XData,...
      'Ydata',ud.Y2Data,...
      'LineStyle','-');
  set(FigHandle,'Toolbar','figure');
  set(FigHandle,'Menubar','figure');

end

% end LocalBlockStopFcn

%
%=============================================================================
% LocalBlockNameChangeFcn
% Function that handles name changes on the Graph scope block.
%=============================================================================
%
function LocalBlockNameChangeFcn

%
% get the figure associated with this block, if it's valid, change
% the name of the figure
%
FigHandle = GetSfunXYFigure(gcbh);
if ishandle(FigHandle),
  set(FigHandle,'Name',get_param(gcbh,'Name'));
end

% end LocalBlockNameChangeFcn

%
%=============================================================================
% LocalBlockLoadCopyFcn
% This is the XYGraph block's LoadFcn and CopyFcn.  Initialize the block's
% UserData such that a figure is not associated with the block.
%=============================================================================
%
function LocalBlockLoadCopyFcn

SetSfunXYFigure(gcbh,-1);

% end LocalBlockLoadCopyFcn

%
%=============================================================================
% LocalBlockDeleteFcn
% This is the XY Graph block'DeleteFcn.  Delete the block's figure window,
% if present, upon deletion of the block.
%=============================================================================
%
function LocalBlockDeleteFcn

%
% Get the figure handle associated with the block, if it exists, delete
% the figure.
%
FigHandle=GetSfunXYFigure(gcbh);
if ishandle(FigHandle),
  delete(FigHandle);
  SetSfunXYFigure(gcbh,-1);
end

% end LocalBlockDeleteFcn

%
%=============================================================================
% LocalFigureDeleteFcn
% This is the XY Graph figure window's DeleteFcn.  The figure window is
% being deleted, update the XY Graph block's UserData to reflect the change.
%=============================================================================
%
function LocalFigureDeleteFcn

%
% Get the block associated with this figure and set it's figure to -1
%
ud=get(gcbf,'UserData');
SetSfunXYFigure(ud.Block,-1)

% end LocalFigureDeleteFcn

%
%=============================================================================
% GetSfunXYFigure
% Retrieves the figure window associated with this S-function XY Graph block
% from the block's parent subsystem's UserData.
%=============================================================================
%
function FigHandle=GetSfunXYFigure(block)

if strcmp(get_param(block,'BlockType'),'S-Function'),
  block=get_param(block,'Parent');
end

FigHandle=get_param(block,'UserData');
if isempty(FigHandle),
  FigHandle=-1;
end

% end GetSfunXYFigure

%
%=============================================================================
% SetSfunXYFigure
% Stores the figure window associated with this S-function XY Graph block
% in the block's parent subsystem's UserData.
%=============================================================================
%
function SetSfunXYFigure(block,FigHandle)

if strcmp(get_param(bdroot,'BlockDiagramType'),'model'),
  if strcmp(get_param(block,'BlockType'),'S-Function'),
    block=get_param(block,'Parent');
  end

  set_param(block,'UserData',FigHandle);
end

% end SetSfunXYFigure

%
%=============================================================================
% CreateSfunXYFigure
% Creates the figure window associated with this S-function XY Graph block.
%=============================================================================
%
function FigHandle=CreateSfunXYFigure

%
% the figure doesn't exist, create one
%
FigHandle = figure('Units',          'pixel',...
                   'Position',       [100 100 400 300],...
                   'Name',           get_param(gcbh,'Name'),...
                   'Tag',            'SIMULINK_XYGRAPH_FIGURE',...
                   'NumberTitle',    'off',...
                   'IntegerHandle',  'off',...
                   'Toolbar',        'none',...
                   'Menubar',        'none',...
                   'DeleteFcn',      'sfunxy2([],[],[],''DeleteFigure'')');
%
% store the block's handle in the figure's UserData
%
ud.Block=gcbh;

%
% create various objects in the figure
%
ud.XYAxes     = axes;
ud.XYLine     = plot(0,0,0,0,'EraseMode','None');
ud.XYXlabel   = xlabel('X Axis');
ud.XYYlabel   = ylabel('Y Axis');
ud.XYTitle    = get(ud.XYAxes,'Title');
ud.XData      = [];
ud.YData      = [];
ud.Y2Data     = [];
ud.axislimits = [0 0 0 0];
set(ud.XYAxes,'Visible','off');

%
% Associate the figure with the block, and set the figure's UserData.
%
SetSfunXYFigure(gcbh,FigHandle);
set(FigHandle,'HandleVisibility','callback','UserData',ud);

% end CreateSfunXYFigure

%
%=============================================================================
% SetBlockCallbacks
% This sets the callbacks of the block if it is not a reference.
%=============================================================================
%
function SetBlockCallbacks(block)

%
% the actual source of the block is the parent subsystem
%
block=get_param(block,'Parent');

%
% if the block isn't linked, issue a warning, and then set the callbacks
% for the block so that it has the proper operation
%
if strcmp(get_param(block,'LinkStatus'),'none'),
%  warnmsg=sprintf(['The XY Graph scope ''%s'' should be replaced with a ' ...
%                   'new version from the Simulink block library'],...
%                   block);
%  warning(warnmsg);

  callbacks={
    'CopyFcn',       'sfunxy2([],[],[],''CopyBlock'')' ;
    'DeleteFcn',     'sfunxy2([],[],[],''DeleteBlock'')' ;
    'LoadFcn',       'sfunxy2([],[],[],''LoadBlock'')' ;
    'StartFcn',      'sfunxy2([],[],[],''Start'')' ;
    'StopFcn'        'sfunxy2([],[],[],''Stop'')' 
    'NameChangeFcn', 'sfunxy2([],[],[],''NameChange'')' ;
  };

  for i=1:length(callbacks),
    if ~strcmp(get_param(block,callbacks{i,1}),callbacks{i,2}),
      set_param(block,callbacks{i,1},callbacks{i,2})
    end
  end
end

% end SetBlockCallbacks

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
粉嫩在线一区二区三区视频| 亚洲精品在线免费播放| 欧美变态凌虐bdsm| 一区二区三区高清在线| 国产精品18久久久久久vr| 欧美日韩一区小说| 日韩美女视频一区| 国产成人av影院| 日韩欧美在线一区二区三区| 悠悠色在线精品| av一二三不卡影片| 国产清纯白嫩初高生在线观看91| 五月天丁香久久| 一本到不卡免费一区二区| 国产欧美精品一区| 国产乱人伦偷精品视频不卡 | 欧美日韩久久久| 中文字幕制服丝袜成人av| 黄色精品一二区| 欧美成人乱码一区二区三区| 亚洲国产精品久久艾草纯爱| 91美女视频网站| 亚洲欧美视频在线观看视频| 丁香激情综合国产| 久久久国产午夜精品| 国产一区二区三区在线看麻豆| 91精品国产欧美日韩| 婷婷综合久久一区二区三区| 在线精品视频小说1| 一区二区在线观看免费| 99久久精品国产毛片| 亚洲欧美一区二区在线观看| 99精品偷自拍| 中文字幕一区二区三区蜜月| 成人福利在线看| 中文字幕一区二区三区乱码在线| zzijzzij亚洲日本少妇熟睡| 亚洲三级在线看| 91激情五月电影| 亚洲国产精品一区二区www| 欧美午夜一区二区| 日韩精品91亚洲二区在线观看 | 成人免费黄色在线| 国产精品久久久久久久岛一牛影视 | 欧美性欧美巨大黑白大战| 亚洲最快最全在线视频| 欧美日韩一区二区三区免费看 | 欧美性感一区二区三区| 午夜av一区二区| 日韩精品最新网址| 国产精品一区在线观看你懂的| 欧美激情在线一区二区三区| 91色porny在线视频| 午夜日韩在线电影| 久久久一区二区三区| 99视频有精品| 视频一区视频二区在线观看| 欧美变态tickle挠乳网站| 成人app在线观看| 午夜精品一区在线观看| 精品免费日韩av| 99热这里都是精品| 免费成人在线视频观看| 国产精品久久国产精麻豆99网站 | 日韩欧美一二三| 91在线视频播放| 日韩成人精品在线| 国产精品免费丝袜| 9191国产精品| 北岛玲一区二区三区四区| 日韩成人一级片| 亚洲男人电影天堂| 精品久久久久久久久久久久久久久久久 | 日韩电影在线一区| 国产精品乱人伦一区二区| 欧美亚洲国产一卡| 成人一区在线看| 五月激情综合婷婷| 一色桃子久久精品亚洲| 日韩午夜在线影院| 91免费版在线| 国产传媒久久文化传媒| 天天综合网天天综合色| 亚洲国产成人自拍| 精品福利一二区| 欧美日韩第一区日日骚| 91色porny在线视频| 色综合久久综合| 国产综合色在线视频区| 亚洲国产精品一区二区www | 欧美一级在线免费| 91在线看国产| 福利一区在线观看| 精品一区二区三区在线观看| 亚洲高清免费在线| 综合久久久久综合| 国产欧美一区二区三区在线看蜜臀| 91精品国产综合久久精品麻豆| 色综合久久88色综合天天免费| 国产精品一区二区三区网站| 蜜臀av性久久久久蜜臀av麻豆| 亚洲3atv精品一区二区三区| 亚洲精品国产精华液| 亚洲手机成人高清视频| 国产欧美日韩在线看| 国产欧美日韩精品一区| 国产日韩三级在线| 久久久久久**毛片大全| 26uuu亚洲综合色| 欧美大尺度电影在线| 日韩欧美国产三级| 欧美成人女星排名| 日韩女优制服丝袜电影| 日韩一区二区电影| 日韩免费福利电影在线观看| 欧美一区二区在线播放| 欧美美女喷水视频| 91精品国产色综合久久ai换脸 | 久久日韩精品一区二区五区| 欧美成人video| 久久综合九色综合欧美就去吻 | 中文字幕一区二区三区色视频| 国产精品人妖ts系列视频| 国产精品久久福利| 亚洲男人的天堂网| 亚洲成人精品在线观看| 日韩黄色在线观看| 国产一区二区视频在线| 成人app网站| 欧美午夜精品电影| 在线观看91av| 久久日韩粉嫩一区二区三区| 国产精品嫩草影院av蜜臀| 亚洲欧洲制服丝袜| 石原莉奈在线亚洲二区| 寂寞少妇一区二区三区| 国产成人丝袜美腿| 色婷婷综合久久| 在线电影一区二区三区| 欧美精品一区二区三区久久久| 国产三级欧美三级日产三级99 | 91色综合久久久久婷婷| 欧美调教femdomvk| 精品国产免费久久| 亚洲欧美在线视频观看| 日本va欧美va瓶| 国产成人一区二区精品非洲| 在线观看日韩av先锋影音电影院| 日韩一区二区在线看片| 国产精品区一区二区三| 天天综合天天做天天综合| 国产精品亚洲综合一区在线观看| 色综合色综合色综合| 日韩亚洲欧美一区| 亚洲欧洲av色图| 紧缚奴在线一区二区三区| 91黄色激情网站| 久久精品无码一区二区三区| 亚洲成人av资源| av中文一区二区三区| 欧美一级xxx| 综合在线观看色| 国产一区二区美女诱惑| 欧美丰满一区二区免费视频 | 日韩精品一区二区三区在线观看| 国产精品―色哟哟| 久久av老司机精品网站导航| 91蝌蚪porny九色| 国产亚洲精久久久久久| 天天色综合成人网| 91亚洲国产成人精品一区二三| 日韩欧美的一区二区| 一区二区三区四区国产精品| 国产成人亚洲综合a∨婷婷 | 中文字幕乱码一区二区免费| 日韩av在线发布| 欧美性欧美巨大黑白大战| 国产精品二三区| 懂色av中文一区二区三区| 日韩一区二区影院| 午夜精品在线视频一区| 日本精品视频一区二区三区| 18成人在线观看| 成人深夜福利app| 国产女人水真多18毛片18精品视频| 免费观看在线综合色| 欧美精品vⅰdeose4hd| 亚洲一区二区视频在线| 色婷婷亚洲一区二区三区| 综合色天天鬼久久鬼色| 91网址在线看| 亚洲黄色av一区| 色呦呦日韩精品| 一区二区三区波多野结衣在线观看| 成人性生交大片免费| 国产精品嫩草久久久久| jlzzjlzz国产精品久久| 中文字幕在线免费不卡| 91亚洲精品久久久蜜桃| 亚洲精品va在线观看|