Borrar filtros
Borrar filtros

Parallel Computing in Simulink

2 visualizaciones (últimos 30 días)
Jose Maria Olmos Perez
Jose Maria Olmos Perez el 9 de Jun. de 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

Respuestas (0)

Categorías

Más información sobre Get Started with Aerospace Blockset en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by