フィルターのクリア

Parallel Computing in Simulink

2 ビュー (過去 30 日間)
Jose Maria Olmos Perez
Jose Maria Olmos Perez 2016 年 6 月 9 日
Hello everyone, I am working on a simulator on simulink, and I have to perform different computations modifying a single parameter (a constant value). It's my first time with parallel computing on matlab so I am following this tutorial. The objective is quite similar but the structure of my .slx file is different, since all the parameters come from a structure variable (except the parameter to modify).
The script works perfectly with the for loop (instead the parfor). The errors that appears are:
Error using parallel_function>make_general_channel/channel_general (line 914)Invalid setting in '-----' for parameter 'Gain'.
I have been reading about the problems of globality and transparency in the parfor loop, and from the problem it seems that matlab doesn't reed the structure variable (although it is generated inside the loop). Do you have any idea/advise or related information to the problem?
Thank you for your time!
P.D: I copy part of the code used.
parfor idx = 1:numCases
struct = SettingParam(); % generates the struct variable for simulink
Simulator % open the simulator.slx
set_param('Simulator/-------/Constant','Value',num2str(parameter(idx)))
Simulation_SimData(idx) = sim('Simulator');
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Aerospace Blockset についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by