How can I define a fitness function for GA optimization from following ANFIS code?

1 view (last 30 days)
load fuzex1trnData.dat
x = fuzex1trnData(:,1);
opt = anfisOptions('InitialFIS',4,'EpochNumber',40);
fis = anfis(fuzex1trnData,opt);
figure
anfisOutput = evalfis(x,fis);
plot(x,fuzex1trnData(:,2),'*r',x,anfisOutput,'.b')
legend('Training Data','ANFIS Output','Location','NorthWest'

Answers (0)

Categories

Find more on Fuzzy Logic Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!