draw 3 d surface of fuzzy relation
1 次查看(过去 30 天)
显示 更早的评论
I want to draw 3D surface of fuzzy relation between error .change of error and control signal. How to do it ? should i take value for the input with step and run it. i wrote the fuzzy in m file i didn't use the toolbox functions
I write the membership function in mfile. but the resulted plot is flat. and workin at constant output
x1=-3:.3:3%%% 1st input
x2=-2:.2:2%%%2nd input
for t=1:1:21
% % % negative big
if x1(t)<=b
NBU=1;
else if x1(t)>=b&&x1(t)<=d
NBU=d-x1(t)/(d-b);
else NBU=0;
end
end
for i=1:1:21
for j=1:1:21
[y,yLeft(i),yRight(j),L,R]=EIASC(Xl,Xr,Wl,Wr,needSort);%%%inference engine
%%%%%%%%%%%%%%%%%%%%%%%output
cu(i,j)=(yLeft(i)+yRight(j))/2; %%%% fuzzy output
end
end
end
surf(x1,x2,cu)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!