chap4_5.m

来自「北航刘金锟老师的《智能控制》附带的完整matlab源程序!」· M 代码 · 共 27 行

M
27
字号
%Define N+1 triangle membership function
clear all;
close all;
z=0:0.1:60;

u=trimf(z,[0,0,10]);
figure(1);
plot(z,u);

u=trimf(z,[0,10,25]);
hold on;
plot(z,u);

u=trimf(z,[10,25,40]);
hold on;
plot(z,u);

u=trimf(z,[25,40,60]);
hold on;
plot(z,u);

u=trimf(z,[40,60,60]);
hold on;
plot(z,u);

xlabel('z');
ylabel('Degree of membership');

⌨️ 快捷键说明

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