load fuzex1trnData.dat

fis = anfis(fuzex1trnData);

x = fuzex1trnData(:,1);

anfisOutput = evalfis(x,fis);

plot(x,fuzex1trnData(:,2),'*r',x,anfisOutput,'.b')

legend('Training Data','ANFIS Output','Location','NorthWest')

opt = anfisOptions('InitialFIS',4,'EpochNumber',40);

opt.DisplayErrorValues = 0;

opt.DisplayStepSize = 0;

fis = anfis(fuzex1trnData,opt);

figure

anfisOutput = evalfis(x,fis);

plot(x,fuzex1trnData(:,2),'*r',x,anfisOutput,'.b')

legend('Training Data','ANFIS Output','Location','NorthWest')

Similar questions and discussions