필터 지우기
필터 지우기

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 CenterFile Exchange에서 Get 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