Given a set of special points, draw a line
Author: Kailugaji - Blog Park http://www.cnblogs.com/kailugaji/
Take the grade membership function as an example:
score.m
cj_x1=[0 0.1]; cj_y1=[1 0]; cj_x2=[0 0.1 0.33 0.43]; cj_y2=[0 1 1 0]; cj_x3=[0.33 0.43 0.66 0.76]; cj_y3=[0 1 1 0]; plot(cj_x1,cj_y1,'b-',cj_x2,cj_y2,'r-',cj_x3,cj_y3,'m-'); title( ' Grade membership function ' ); legend( ' Failed ' , ' Good ' , ' Excellent ' ) xlabel( ' normalized score ' ), ylabel( ' membership ' ); axis([0 0.8 0 1.3]);
result: