does m-file cooperate with fis?
3 views (last 30 days)
Show older comments
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?
0 Comments
Accepted Answer
Arkadiy Turevskiy
on 26 Mar 2012
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
More Answers (0)
See Also
Categories
Find more on Fuzzy Logic Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!