- You could use a for loop. Simple and straightforward.
- You could move your statements into a function block and write a script which calls the function. Here's something you can adapt:
Multiple inputs to ANFIS
조회 수: 5 (최근 30일)
이전 댓글 표시
f = readfis('ANIS.fis')
a =input('input values');
g = evalfis([a],f);
disp(['',num2str(g)])
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 =
'0'
0
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.
댓글 수: 0
답변 (1개)
Asvin Kumar
2021년 5월 11일
a = [1 0; ...
0 0; ...
1 1];
for i=1:size(a,1)
evaluateMyFIS(a(i,:));
end
function g = evaluateMyFIS(a)
f = readfis('tipper');
g = evalfis(f,a);
disp(num2str(g))
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!