How to program loop in simulink
古いコメントを表示
I want to create a auto-update of my controller parameters using for example PSO. I programmed in Integrated-matlab function block. The PSO requires looping for a defined population.However if i write a sim callout as below:
simopt = simset('solver','ode5','SrcWorkspace','Current','DstWorkspace','Current'); % Initialize sim options [tout,xout,yout] = sim('ExternePID',[0 30],simopt);
within for-loop of defined population in my integrated matlab function, then the whole system is running without ending. How to fix this? I need a loop in a simulink that can calculate the fitness of each population/iteration of normal PID-control system. The matlab version is R2015b. Thank you in advance sincerely, Hanif
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Discontinuities についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!