does m-file cooperate with fis?

hi, I have created 3 FIS systems, where output of first FIS is one of inputs of next FIS system and so on. I have defined variables and I have run all 3 FIS step by step through command evalfis in command window. It was working. But when I tried rewrite this commands to m-file as a function with all FIS input variables, the error occured. Matlab can't recognize name of FIS function and noticed, that name of FIS system is undefined function or variable. I have also tried define name of FIS system as input of function in m-file. Ofcourse, I didn't forget export FIS to workspace before each run. What can I do?

 채택된 답변

Arkadiy Turevskiy
Arkadiy Turevskiy 2012년 3월 26일

0 개 추천

It has nothing to do with fis. Each function is working with a local workspace, so if you want to use a variable from MATLAB workspace inside of your function, you need to declare it global. More on this here:
HTH. Arkadiy

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Fuzzy Logic in Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by