Error in MATLAB code for Sugeno fuzzy system

Hello What’s wrong with this code? I’m trying to write a fuzzy logic program of type Sugeno in Matlab
clc
clear
close all
warning off all

y = newfis(‘tipper1’ , ‘sugeno’ ,’ min’ , ‘max ‘,’ min’ ,’max’ ,’wtaver’);

%input2 service
y.Inputs(1).Name = ‘service’;
y.Inputs(1).Range = [0 10];

y.Inputs(1).MembershipFunctions(1).Name = ‘poor’;
y.Inputs(1).MembershipFunctions(1).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(1).Parameters = [1.5 0];

y.Inputs(1).MembershipFunctions(2).Name = ‘good’;
y.Inputs(1).MembershipFunctions(2).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(2).Parameters = [1.5 5];

y.Inputs(1).MembershipFunctions(3).Name = ‘excellent’;
y.Inputs(1).MembershipFunctions(3).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(3).Parameters = [1.5 10];

%input2 food
y.Inputs(2).Name = ‘food’;
y.Inputs(2).Range = [0 10];

y.Inputs(2).MembershipFunctions(1).Name = ‘rancid’;
y.Inputs(2).MembershipFunctions(1).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(1).Parameters = [1.5 0];

y.Inputs(2).MembershipFunctions(2).Name = ‘delicious’;
y.Inputs(2).MembershipFunctions(2).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(2).Parameters = [1.5 5];

y.Inputs(2).MembershipFunctions(3).Name = ‘ffd’;
y.Inputs(2).MembershipFunctions(3).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(3).Parameters = [1.5 10];

% output
y.output.Name = ‘tip1’;
y.output.Range = [1 10];

y.output(1).MembershipFunctions(1).Name = ‘a’;
y.output(1).MembershipFunctions(1).Type = ‘linear’;
y.output(1).MembershipFunctions(1).Parameters =[0 0 0 9];

y.output(1).MembershipFunctions(2).Name = ‘b’;
y.output(1).MembershipFunctions(2).Type = ‘linear’;
y.output(1).MembershipFunctions(2).Parameters =[0 0 0 1];

y.output(1).MembershipFunctions(3).Name = ‘c’;
y.output(1).MembershipFunctions(3).Type = ‘linear’;
y.output(1).MembershipFunctions(3).Parameters =[0 0 0 2];

y.output(1).MembershipFunctions(4).Name = ‘d’;
y.output(1).MembershipFunctions(4).Type = ‘linear’;
y.output(1).MembershipFunctions(4).Parameters =[0 0 0 3];

y.output(1).MembershipFunctions(5).Name = ‘e’;
y.output(1).MembershipFunctions(5).Type = ‘linear’;
y.output(1).MembershipFunctions(5).Parameters =[0 0 0 4];

y.output(1).MembershipFunctions(6).Name = ‘f’;
y.output(1).MembershipFunctions(6).Type = ‘linear’;
y.output(1).MembershipFunctions(6).Parameters =[0 0 0 5];

y.output(1).MembershipFunctions(7).Name = ‘h’;
y.output(1).MembershipFunctions(7).Type = ‘linear’;
y.output(1).MembershipFunctions(7).Parameters =[0 0 0 6];

y.output(1).MembershipFunctions(8).Name = ‘i’;
y.output(1).MembershipFunctions(8).Type = ‘linear’;
y.output(1).MembershipFunctions(8).Parameters = [0 0 0 7];

y.output(1).MembershipFunctions(9).Name = ‘g’;
y.output(1).MembershipFunctions(9).Type = ‘linear’;
y.output(1).MembershipFunctions(9).Parameters = [0 0 0 8];

ruleList = [1 1 9 1 1 ; 1 2 1 1 1 ; 1 3 2 1 1 ; 2 1 3 1 1 ; 2 2 4 1 1 ;
2 3 5 1 1 ; 3 1 6 1 1 ; 3 2 7 1 1 ; 3 3 8 1 1];

y=addrule(y ,’ rulelist’);

y= setfis(y , ‘name’ , ‘tipper1’);

y = readfis(‘tipper1’);

plotmf(y,’input’,2);Hello What’s wrong with this code? I’m trying to write a fuzzy logic program of type Sugeno in Matlab
clc
clear
close all
warning off all

y = newfis(‘tipper1’ , ‘sugeno’ ,’ min’ , ‘max ‘,’ min’ ,’max’ ,’wtaver’);

%input2 service
y.Inputs(1).Name = ‘service’;
y.Inputs(1).Range = [0 10];

y.Inputs(1).MembershipFunctions(1).Name = ‘poor’;
y.Inputs(1).MembershipFunctions(1).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(1).Parameters = [1.5 0];

y.Inputs(1).MembershipFunctions(2).Name = ‘good’;
y.Inputs(1).MembershipFunctions(2).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(2).Parameters = [1.5 5];

y.Inputs(1).MembershipFunctions(3).Name = ‘excellent’;
y.Inputs(1).MembershipFunctions(3).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(3).Parameters = [1.5 10];

%input2 food
y.Inputs(2).Name = ‘food’;
y.Inputs(2).Range = [0 10];

y.Inputs(2).MembershipFunctions(1).Name = ‘rancid’;
y.Inputs(2).MembershipFunctions(1).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(1).Parameters = [1.5 0];

y.Inputs(2).MembershipFunctions(2).Name = ‘delicious’;
y.Inputs(2).MembershipFunctions(2).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(2).Parameters = [1.5 5];

y.Inputs(2).MembershipFunctions(3).Name = ‘ffd’;
y.Inputs(2).MembershipFunctions(3).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(3).Parameters = [1.5 10];

% output
y.output.Name = ‘tip1’;
y.output.Range = [1 10];

y.output(1).MembershipFunctions(1).Name = ‘a’;
y.output(1).MembershipFunctions(1).Type = ‘linear’;
y.output(1).MembershipFunctions(1).Parameters =[0 0 0 9];

y.output(1).MembershipFunctions(2).Name = ‘b’;
y.output(1).MembershipFunctions(2).Type = ‘linear’;
y.output(1).MembershipFunctions(2).Parameters =[0 0 0 1];

y.output(1).MembershipFunctions(3).Name = ‘c’;
y.output(1).MembershipFunctions(3).Type = ‘linear’;
y.output(1).MembershipFunctions(3).Parameters =[0 0 0 2];

y.output(1).MembershipFunctions(4).Name = ‘d’;
y.output(1).MembershipFunctions(4).Type = ‘linear’;
y.output(1).MembershipFunctions(4).Parameters =[0 0 0 3];

y.output(1).MembershipFunctions(5).Name = ‘e’;
y.output(1).MembershipFunctions(5).Type = ‘linear’;
y.output(1).MembershipFunctions(5).Parameters =[0 0 0 4];

y.output(1).MembershipFunctions(6).Name = ‘f’;
y.output(1).MembershipFunctions(6).Type = ‘linear’;
y.output(1).MembershipFunctions(6).Parameters =[0 0 0 5];

y.output(1).MembershipFunctions(7).Name = ‘h’;
y.output(1).MembershipFunctions(7).Type = ‘linear’;
y.output(1).MembershipFunctions(7).Parameters =[0 0 0 6];

y.output(1).MembershipFunctions(8).Name = ‘i’;
y.output(1).MembershipFunctions(8).Type = ‘linear’;
y.output(1).MembershipFunctions(8).Parameters = [0 0 0 7];

y.output(1).MembershipFunctions(9).Name = ‘g’;
y.output(1).MembershipFunctions(9).Type = ‘linear’;
y.output(1).MembershipFunctions(9).Parameters = [0 0 0 8];

ruleList = [1 1 9 1 1 ; 1 2 1 1 1 ; 1 3 2 1 1 ; 2 1 3 1 1 ; 2 2 4 1 1 ;
2 3 5 1 1 ; 3 1 6 1 1 ; 3 2 7 1 1 ; 3 3 8 1 1];

y=addrule(y ,’ rulelist’);

y= setfis(y , ‘name’ , ‘tipper1’);

y = readfis(‘tipper1’);

plotmf(y,’input’,2); Hello What’s wrong with this code? I’m trying to write a fuzzy logic program of type Sugeno in Matlab
clc
clear
close all
warning off all

y = newfis(‘tipper1’ , ‘sugeno’ ,’ min’ , ‘max ‘,’ min’ ,’max’ ,’wtaver’);

%input2 service
y.Inputs(1).Name = ‘service’;
y.Inputs(1).Range = [0 10];

y.Inputs(1).MembershipFunctions(1).Name = ‘poor’;
y.Inputs(1).MembershipFunctions(1).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(1).Parameters = [1.5 0];

y.Inputs(1).MembershipFunctions(2).Name = ‘good’;
y.Inputs(1).MembershipFunctions(2).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(2).Parameters = [1.5 5];

y.Inputs(1).MembershipFunctions(3).Name = ‘excellent’;
y.Inputs(1).MembershipFunctions(3).Type = ‘gaussmf’;
y.Inputs(1).MembershipFunctions(3).Parameters = [1.5 10];

%input2 food
y.Inputs(2).Name = ‘food’;
y.Inputs(2).Range = [0 10];

y.Inputs(2).MembershipFunctions(1).Name = ‘rancid’;
y.Inputs(2).MembershipFunctions(1).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(1).Parameters = [1.5 0];

y.Inputs(2).MembershipFunctions(2).Name = ‘delicious’;
y.Inputs(2).MembershipFunctions(2).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(2).Parameters = [1.5 5];

y.Inputs(2).MembershipFunctions(3).Name = ‘ffd’;
y.Inputs(2).MembershipFunctions(3).Type = ‘gaussmf’;
y.Inputs(2).MembershipFunctions(3).Parameters = [1.5 10];

% output
y.output.Name = ‘tip1’;
y.output.Range = [1 10];

y.output(1).MembershipFunctions(1).Name = ‘a’;
y.output(1).MembershipFunctions(1).Type = ‘linear’;
y.output(1).MembershipFunctions(1).Parameters =[0 0 0 9];

y.output(1).MembershipFunctions(2).Name = ‘b’;
y.output(1).MembershipFunctions(2).Type = ‘linear’;
y.output(1).MembershipFunctions(2).Parameters =[0 0 0 1];

y.output(1).MembershipFunctions(3).Name = ‘c’;
y.output(1).MembershipFunctions(3).Type = ‘linear’;
y.output(1).MembershipFunctions(3).Parameters =[0 0 0 2];

y.output(1).MembershipFunctions(4).Name = ‘d’;
y.output(1).MembershipFunctions(4).Type = ‘linear’;
y.output(1).MembershipFunctions(4).Parameters =[0 0 0 3];

y.output(1).MembershipFunctions(5).Name = ‘e’;
y.output(1).MembershipFunctions(5).Type = ‘linear’;
y.output(1).MembershipFunctions(5).Parameters =[0 0 0 4];

y.output(1).MembershipFunctions(6).Name = ‘f’;
y.output(1).MembershipFunctions(6).Type = ‘linear’;
y.output(1).MembershipFunctions(6).Parameters =[0 0 0 5];

y.output(1).MembershipFunctions(7).Name = ‘h’;
y.output(1).MembershipFunctions(7).Type = ‘linear’;
y.output(1).MembershipFunctions(7).Parameters =[0 0 0 6];

y.output(1).MembershipFunctions(8).Name = ‘i’;
y.output(1).MembershipFunctions(8).Type = ‘linear’;
y.output(1).MembershipFunctions(8).Parameters = [0 0 0 7];

y.output(1).MembershipFunctions(9).Name = ‘g’;
y.output(1).MembershipFunctions(9).Type = ‘linear’;
y.output(1).MembershipFunctions(9).Parameters = [0 0 0 8];

ruleList = [1 1 9 1 1 ; 1 2 1 1 1 ; 1 3 2 1 1 ; 2 1 3 1 1 ; 2 2 4 1 1 ;
2 3 5 1 1 ; 3 1 6 1 1 ; 3 2 7 1 1 ; 3 3 8 1 1];

y=addrule(y ,’ rulelist’);

y= setfis(y , ‘name’ , ‘tipper1’);

y = readfis(‘tipper1’);

plotmf(y,’input’,2); sugeno MATLAB Answers — New Questions

​

Leave a Reply

Your email address will not be published. Required fields are marked *