ALL researchers
it is suggested to write a code for this purpose.
If you prefer to use the MATLAB function, you can create a FIS as follows,
newfis:for creating a new FIS
a = newfis('mymodel','sugeno','min','max','prod')
defining first input
a = addvar(a,'input','input1',[-30 30]);
a = addmf(a,'input',1,'Negative','gaussmf',[x1 x2]);
a = addmf(a,'input',1,'Zero','gaussmf',[x3 x4]);
a = addmf(a,'input',1,'Posetive','gaussmf',[x5 x6]);
% defining output
a = addvar(a,'output','myFn',[-20 20]);
a = addmf(a,'output',1,'Vriable','constant',x10);
rulelist=[ 1 0 0 1];
a=addrule(a,rulelist);
then you can adjust the parameters, using :
[fis,err_r,stp_sz,chkfis, chk_err] = anfis([input_data output_data],fismat,trnoption,dispopt,chk_data)
But it is trained all parameters consisting the membership and fuzzy rules parameters.
If you want to adjust just the fuzzy rules, it is better to extract rule matrix and then tune them.
The alternative way is creating FIS without using the MATLAB fuzzy codes.
% (Adaptive Neuro-Fuzzy Inference System) file
x = (0:0.2:10)';
y = sin(2*x)./exp(x/5) + randn(size(x))/30;
TrainData = [x y];
NumMfs = 5;
MfType = 'gbellmf';
NumEpochs = 20;
StepSize = 0.1;
InputFismat = genfis1(TrainData, NumMfs, MfType);
OutputFismat = anfis(TrainData, InputFismat, [NumEpochs nan StepSize]);
yy = evalfis(x, OutputFismat);
plot(x, y, 'o', x, yy, 'x', x, y, 'y', x, yy, 'm');
legend('Training Data', 'ANFIS Output');
% ------- ----------- -------
[xx, yy] = meshgrid(-5:5);
input = [xx(:) yy(:)];
fismat = readfis('mam21');
out = evalfis(input, fismat);
surf(xx, yy, reshape(out, 11, 11))
title('evalfis')
plz where is file data1 at last program?
How to write the matlab code for a cracked cantilever beam for natural frequency and mode shape ?
10 November 2017 9,955 1 View
how to write the matlab code for a crack in cantilever beam for natural frequency and mode shape
10 November 2017 9,910 0 View
how to write Neural Network and ANFIS MATLAB code for multiple outputs.
06 July 2017 802 1 View
Anybody can provide a MANFIS (Multiple ANFIS) sample code?
11 December 2015 2,987 1 View
I would like to understand potential safety concerns while handling SEB in the lab. Especially while working in animal house facility. Would like to know precautions for handling. Sigma MSDS...
07 August 2024 6,034 3 View
During low-temperature testing, new diffraction peaks that appear could be indicative of several phenomena. In one of our tests, we observed notable new peaks around 40° and 45° in a specific...
06 August 2024 726 3 View
I need the python code to forecast what crop production will be in the next decade considering climate and crop production variables as seen in the attached.csv file.
05 August 2024 2,977 3 View
I am new to Micromechanics and having similar problem with understanding the implementation of the formula's. I would appreciate if anyone can guide me on how to go about getting a scalar value...
30 July 2024 969 0 View
Some Staphylococcus aureus strains Inhibit the growth of Mycobacteria in Mueller Hinton Agar medium containing 10% OADC. Do some Staphylococcus aureus strains have in vitro antimycobacterial activity?
29 July 2024 10,023 2 View
Please, what is the memory consumption of the Matlab function quad tree decomposition procedure [S = qtdecomp(I)] with respect to the input set I?
27 July 2024 5,455 2 View
all math can be traversed by code? all math can be translate to code?
26 July 2024 9,530 0 View
Hello, I am a research scholar currently working on a project involving image segmentation, and I am interested in using differential evolution for this purpose . I would greatly appreciate it if...
25 July 2024 9,926 1 View
Hello!!! I want to implement the Swerling characteristics functions (CF) directly in MATLAB without using its Fourier integral pairs...the Swerling CFs are actually Laplace Transform of the signal...
23 July 2024 4,925 1 View
Hello, colleagues! There is commenting open for new upcoming edition of USP 1033. Validation target acceptance criteria is now different from what it used to be and it doesn't include Cpm....
23 July 2024 7,292 3 View