MATLAB Answers

Multiple inputs to ANFIS

조회 수: 9(최근 30일)
thorati chiranjeevi
thorati chiranjeevi 2021년 3월 30일
답변: Asvin Kumar 2021년 5월 11일
f = readfis('ANIS.fis')
a =input('input values');
g = evalfis([a],f);
This is the code I have which asks to enter the input in the form of array[ ]
input values[1 0 1 0 1 1 1 1]
k =
This is the output I am getting. Now I want to run this program for n times for n different input arrays to get the output.


Asvin Kumar
Asvin Kumar 2021년 5월 11일
  1. You could use a for loop. Simple and straightforward.
  2. You could move your statements into a function block and write a script which calls the function. Here's something you can adapt:
a = [1 0; ...
0 0; ...
1 1];
for i=1:size(a,1)
5.5375 5.078 5.5375
function g = evaluateMyFIS(a)
f = readfis('tipper');
g = evalfis(f,a);

Community Treasure Hunt

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

Start Hunting!

Translated by