ctr_func.m

来自「FISMAT accommodates different arithmetic」· M 代码 · 共 36 行

M
36
字号
function  [y,x] = ctr_func(ctr,ts,bo)% [y,x] = ctr_func(ctr,ts,bo)%% Input - Output function of a one-dimensional fuzzy or neural controller.%% ctr is the name of the controller-file. (given as a string)% bo = [from to] = the range to be calculated.% ts = sampling time - passed to the controller.% The controller file gets besides the input value a state vector with the% input and output values from the last sample step.%% Without lefthand arguments the function is plotted.%% FSTB - Fuzzy Systems Toolbox for MATLAB% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK%% 20-April-1994 disp('Working, please wait...');x=linspace(bo(1),bo(2),100); y=x;xv=zeros(2,1);for i=1:100;  u=x(i);  o=feval(ctr,u,xv,ts);  xv(1)=u; xv(2)=o;  y(i)=o;end;if nargout==0,  plot(x,y);grid;  return;end;

⌨️ 快捷键说明

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