Error in Untitled (line 35)
e=mse(zt-z)
The code is as follows;
clear all;
close all
%largedata
WinningData
tr=115;
testr=size(inputs,1)-tr;
intrain=inputs(1:tr,:);
outtrain=output(1:tr,:);
% point in two d
for i=1:size(outtrain,1);
z(i,1)=sqrt(outtrain(i,1)^2+outtrain(i,2)^2);
end
% fuzzy autorule generation
%keyboard
epoch_n = 2;
in_fis = genfis1([intrain z],3,'trimf');
out_fis = anfis([intrain z],in_fis,epoch_n);
y=evalfis(intrain,out_fis);
plot(1:size(y,1),y,1:size(y,1),z);
legend('Training Data','ANFIS Output');
intest=inputs(tr+1:tr+testr,:);
outtest=output(tr+1:tr+testr,:);
for i=1:size(outtest,1);
zt(i,1)=sqrt(outtest(i,1)^2+outtest(i,2)^2);
end
yt=evalfis(intest,out_fis);
figure;plot(1:size(yt,1),yt,1:size(yt,1),zt);
e=mse(zt-z);
str1=num2str(e);
out = ['Error= ' str1];
title(out);
writefis(out_fis,'test.fis')