📄 ctr_func.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -