Azzera filtri
Azzera filtri

Parallel Computing in Simulink

2 visualizzazioni (ultimi 30 giorni)
Jose Maria Olmos Perez
Jose Maria Olmos Perez il 9 Giu 2016
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

Risposte (0)

Categorie

Scopri di più su Get Started with Aerospace Blockset in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by