用matlab编程,F1这里卡住了,过不去
function ri = thrindmembershipforfactorMMYG(c0,c1,c2,c3,c4,u2)
function F0 = menbershipfor0TXmax(c1,c2,u2)
c0;c1;c2;c3;c4;u2;
if u2<=c2
F0 =0;
elseif (c2c1)
F0=(u2-c2)/(c1-c2);
else u2>=c1;
F0=1;
end
end%因素对于"0"的隶属度函数,梯形分布的偏大型
function F1=membeishipfor1mid(c0,c1,c2,c3,u2)
c0;c1;c2;c3;c4;u2;
if (u2<=c3)||(u2>c0)
F1 =0;
elseif (c3c2)
F1=(u2-c3)/(c2-c3);
elseif (u2>=c1)&&(u2<c1)
F1=1;
elseif (u2>c1)&&(u2<c0)
F1=(c0-u2)/(c0-c1);
else
end
end%因素对于"1"的隶属度函数,梯形分布的中间型
function F2=membeishipfor2mid(c1,c2,c3,c4,u2)
c0;c1;c2;c3;c4;u2;
if (u2<=c4)||(u2>c1)
F2 =0;
elseif (c4c3)
F2=(u2-c4)/(c3-c4);
elseif (u2>=c3)&&(u2<c2)
F2=1;
elseif (u2>c2)&&(u2<c1)
F2=(c1-u2)/(c1-c2);
else
end
end%因素对于"2"的隶属度函数,梯形分布的中间型
function F3=membeishipfor3mid(c2,c3,u2)
c0;c1;c2;c3;c4;u2;
if u2>c2
F3 =0;
elseif (c3c2)
F3=(c2-u2)/(c2-c3);
else u2<c3;
F3=1;
end
end%因素对于"3"的隶属度函数,梯形分布的偏小型
a=menbershipfor0TXmax(c1,c2,u2)
b=membeishipfor1mid(c0,c1,c2,c3,u2)
c=membeishipfor2mid(c1,c2,c3,c4,u2)
d=membeishipfor3mid(c2,c3,u2)
ri=[a b c d]
end
thrindmembershipforfactorMMYG(80,60,40,20,0,55)
a =
0.7500
Output argument "F1" (and possibly others) not assigned a value in the execution with
"thrindmembershipforfactorMMYG/membeishipfor1mid" function.
出错 thrindmembershipforfactorMMYG (第 55 行)
b=membeishipfor1mid
F1有什么问题,为什么说没有赋值呢?
求出 ri