- Variable 'BlwnSampling' does not exist.
- Variable 'BlwnPower' does not exist.
Error with parsim() while changing variables
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gaston Fermandois Cornejo
el 26 de Sept. de 2022
Comentada: Gaston Fermandois Cornejo
el 1 de Oct. de 2022
Hi Everyone,
I'm having the following problem with parsim(). I'm trying to run a Monte Carlo simulation of a Simulink model where I want to assign a different seed value to band-limited white noise (BLWN) block in each run. I defined all the parameters of this block as variables in Workspace, which are transferred as variables for the Simulink model workspace.
It appears my code successfully changes the values of the BLWN seed for each simulation, but unfortunately, I have errors, and the simulations are not run. I have attached the Matlab script and Simulink model to this message. Please help!
Thanks, Gaston
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1136940/image.png)
0 comentarios
Respuesta aceptada
Bala Tripura Bodapati
el 29 de Sept. de 2022
Hi Gaston Fermandois
It is my understanding that the following errors are encountered while running Monte Carlo Simulation of a Simulink model using the 'parsim()' function:
The above issues are encountered because of the invisibility of the variables used in the model and defined in the base workspace to the parallel workers. In order to resolve this issue, the 'TransferBaseWorkspaceVariables' property must be set to 'on' while calling the 'parsim()' function.
The following code illustrates how to set the 'TranferBaseWorkspaceVariables' property:
out = parsim(in,'ShowSimulationManager', 'on','TransferBaseWorkspaceVariables','on');
Más respuestas (0)
Ver también
Categorías
Más información sobre Run Multiple Simulations 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!