|
仔细看看help
trnData: the name of a training data set. This matrix contains data input in all but the last column. The last column contains a single vector of output data.
%%%% 自己根据自带例子写的多变量输入,不知正确否
clc
clear
x1 =linspace(0,6.28,20)';
x2=linspace(-2,2,20)';
y =sin(x1)+x2;
trnData = [x1 x2 y];
numMFs = 5;
mfType = 'gbellmf';
epoch_n = 20;
in_fis = genfis1(trnData,numMFs,mfType);
out_fis = anfis(trnData,in_fis,20);
plot(y)
hold on
plot(evalfis([x1 x2],out_fis),'ro');
legend('Training Data','ANFIS Output'); |
评分
-
1
查看全部评分
-
|