各种控制
源代码在线查看: chap3_2.m
软件大小: |
42 K |
上传用户: |
foreverNewcomer |
|
|
关键词: |
控制
|
下载地址: |
免注册下载 普通下载
|
|
%Membership function
clear all;
close all;
M=6;
if M==1 %Guassian membership function
x=0:0.1:10;
y=gaussmf(x,[2 5]);
plot(x,y,'k');
xlabel('x');ylabel('y');
elseif M==2 %General Bell membership function
x=0:0.1:10;
y=gbellmf(x,[2 4 6]);
plot(x,y,'k');
xlabel('x');ylabel('y');
elseif M==3 %S membership function
x=0:0.1:10;
y=sigmf(x,[2 4]);
plot(x,y,'k');
xlabel('x');ylabel('y');
elseif M==4 %Trapezoid membership function
x=0:0.1:10;
y=trapmf(x,[1 5 7 8]);
plot(x,y,'k');
xlabel('x');ylabel('y');
elseif M==5 %Triangle membership function
x=0:0.1:10;
y=trimf(x,[3 6 8]);
plot(x,y,'k');
xlabel('x');ylabel('y');
elseif M==6 %Z membership function
x=0:0.1:10;
y=zmf(x,[3 7]);
plot(x,y,'k');
xlabel('x');ylabel('y');
end