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

📄 fuzdemos.m

📁 模糊控制工具箱,很好用的,有相应的说明文件,希望对大家有用!
💻 M
字号:
function fuzdemos
%FUZDEMOS List of all Fuzzy Logic Toolbox demos.
%   The command FUZDEMOS by itself will open a figure window
%   with buttons corresponding to each demo. To see a demo,
%   press a button.
%
%   Demos include the pole and cart demo, the truck backing demo, 
%   fuzzy c-means clustering, and others.

%   Kelly Liu, 10-24-97
%   Copyright 1994-2004 The MathWorks, Inc.
%   $Revision: 1.11.2.3 $  $Date: 2005/06/27 22:36:39 $

% Create GUI
labelList=[
    'ANFIS: Noise cancellation                    '
    'ANFIS: Time-series prediction                '
    'ANFIS: Gas mileage prediction              '
    'Fuzzy c-means clustering                     '
    'Subtractive clustering                       '
    'Inverse kinematics                           '
    'Defuzzification                              '
    'Membership function gallery                  '];

nameList=[
    'noisedm         '
    'mgtsdemo        '
    'gasdemo         '
    'fcmdemo         '
    'trips           '
    'invkine         '
    'defuzzdm        '
    'mfdemo          '];

% Add SIMULINK demos if SIMULINK is available
if exist('open_system')==5,
    labelList2=[ ...
            'Water Tank (sim)                '];
    labelList=str2mat(labelList,labelList2);
    nameList2=[ ...
        'sltankrule '];
    nameList=str2mat(nameList,nameList2);
end


figNum=figure('name', 'Fuzzy Logic Toolbox Demos',...
    'NumberTitle','off', ...
    'Visible','off',...
    'HandleVisibility','off',...
    'DockControls','off');
pos = get(figNum,'position');
pos(3) = .8 * pos(3);
set(figNum,'Position',pos)
hBorder = 0.06;
uicontrol(figNum, 'Style', 'listbox', ...
    'units','norm',...
    'Position',[hBorder .22 1-2*hBorder .7],...
    'String', labelList,  ...
    'Tag', 'listbox');
uicontrol(figNum, 'Style', 'pushbutton', ...
    'units','norm',...
    'Position',[hBorder .12 1-2*hBorder .06],...
    'String', 'Run this demo',...
    'Callback',@LocalRunDemo); 
uicontrol(figNum, 'Style', 'pushbutton', ...
    'units','norm',...
    'Position',[hBorder .04 1-2*hBorder .06],...
    'String', 'Close',...
    'Callback', 'close(gcbf)'); 
set(figNum,'Visible','on','Userdata', nameList)


%----------------

function LocalRunDemo(hSrc,event)

nameList=get(gcbf, 'Userdata');
listHndl=findobj(gcbf, 'Tag', 'listbox');
index=get(listHndl, 'Value');
eval(deblank(nameList(index,:)));

⌨️ 快捷键说明

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