⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 postprocess_exact.m

📁 Fuzzy Precompensated Control
💻 M
字号:
%M-file for Post processing
function [sys,x0,str,ts] = postprocess(t,x,u,flag)
% Dispatch the flag. The switch function controls the calls to 
% S-function routines at each simulation stage.
switch flag,

   case 0
     [sys,x0,str,ts] = mdlInitializeSizes; % Initialization

   case 3
     sys = mdlOutputs(t,x,u); % Calculate outputs

   case { 1, 2, 4, 9 }
     sys = []; % Unused flags

   otherwise
     error(['Unhandled flag = ',num2str(flag)]); % Error handling
end;
function [sys,x0,str,ts] = mdlInitializeSizes
% Call function simsizes to create the sizes structure.
sizes = simsizes;
% Load the sizes structure with the initialization information.
sizes.NumContStates= 0;
sizes.NumDiscStates= 0;
sizes.NumOutputs=    2;
sizes.NumInputs=     2;
sizes.DirFeedthrough=1;
sizes.NumSampleTimes=1;
% Load the sys vector with the sizes information.
sys = simsizes(sizes);
%
x0 = []; % No continuous states
% 
str = []; % No state ordering
% 
ts = [-1 0]; % Inherited sample timefunction sys = mdlOutputs(t,x,u)
function sys = mdlOutputs(t,x,u)
sys = postmnmx(u,[-93.0422  -57.4489]',[136.3857   51.5392]');

% End of mdlOutputs.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -