因为问题所限,在fuzzy工具箱的simulink里需要添加的规则多达2500多条,大大超出了fuzzy simulink的范围。查了一些资料发现:
Simulink block positions have been restricted to be less than 32768.
In the Fuzzy Wizard block case this limit is reached with a very large number of rules. As a workaround, you can decrease vertical spacing between the blocks in Fuzzy wizard. You can do this by editing line 260 in 'fuzwizmask.m' in the '$MATLABROOT/toolbox/fuzzy/fuzzy' folder.
The original code is:
'y0 = y0 + dym1 + dym2 + 30;
You may change the space between blocks on 'y' axis from 30 to a smaller number to accomodate all the blocks.
但是问题出来了,因为我试了下,这个方法最低将30修改为1,也只是能把规则限制提高到500多一点,离我的2500还差很远。每次运行,还是出现以下一样的错误(我知道这是超限的原因,我试了500条规则rule,就能很正常的运行):
Error in 'untitled1/Fuzzy Controller with Ruleviewer/Fuzzy Logic Controller/FIS Wizard': Initialization commands cannot be evaluated. MATLAB error message: Error using ==> add_block
Input bounds are out of range.
请问:怎么才能提高fuzzy工具箱的simulink里的rule限制到2500左右。谢谢。