how do I change the fuzzy membership function range using the parsim command?
1 次查看(过去 30 天)
显示 更早的评论
I want to realize parallel operation through parsim, and change the range of membership function of the fuzzy controller in the last simulation model and the next simulation model. But when I ran the program, I found that parallel operations are all the same variables, which are the last variables of the loop. Here is my code.
open_system('ship_project_min_221207_fuzzycontrol');
load_system('ship_project_min_221207_fuzzycontrol');
model='ship_project_min_221207_fuzzycontrol';
x=0:1:5;
for i = 1:6
shipfuzzycontrol5=readfis('shipfuzzycontrol5');
shipfuzzycontrol5.Outputs(1).MembershipFunctions(3).Parameters = [45 52.5 52.5+x(i)];
in(i) = Simulink.SimulationInput('ship_project_min_221207_fuzzycontrol');
writeFIS(shipfuzzycontrol5,'shipfuzzycontrol5')
end
fuzzy = parsim(in , 'ShowProgress', 'on','ShowSimulationManager','on','TransferBaseWorkspaceVariables','on');
1 个评论
Alvaro
2023-1-18
Could you post the output you are getting and perhaps the full or a simplified model of what you are trying to simulate? It is not clear to me what you mean by parallel operations being the same variables, do you mean that each parallel worker is yielding the same output?
回答(0 个)
另请参阅
类别
在 Help Center 和 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!