Disable Parsim Warning Messages

1 visualización (últimos 30 días)
Caleb McFarlane
Caleb McFarlane el 3 de Jun. de 2024
Comentada: Steven Lord el 3 de Jun. de 2024
I am running a Simscape model using Parsim.
This is the function I am using to run Parsim. When I look in the simulation manager, In the diagnostics section, I still see warnings. Will these slow down simulations? How do I force warning to be supressed and why does the 'warning off' in my code not work?
Thanks.
function [SimOutput] = SimSweep(model_name,variable_name_1,variable_array_1,variable_name_2,variable_array_2)
isModelOpen = bdIsLoaded(model_name);
open_system(model_name);
warning off;
% Main loop to sweep over conditions
for ii = 1:length(variable_array_1)
for jj = 1:length(variable_array_2)
warning off
in(ii,jj) = Simulink.SimulationInput(model_name);
in(ii,jj) = setVariable(in(ii,jj), variable_name_1, variable_array_1(ii));
in(ii,jj) = setVariable(in(ii,jj), variable_name_2, variable_array_2(jj));
end
end
SimOutput = parsim(in, 'TransferBaseWorkspaceVariables', 'on', 'ShowSimulationManager', 'on', 'ShowProgress', 'on');
end
  1 comentario
Steven Lord
Steven Lord el 3 de Jun. de 2024
Can you show us the full and exact text of those warning messages? Seeing those messages may be useful in determining what's going on and how to avoid the warning and/or error.
Generally, turning all warnings off is a very big hammer and I'd discourage it unless you know why you're receiving all those warnings. If you have a headache that lasts for days and days, you probably wouldn't just keep taking aspirin and hoping it goes away.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Troubleshooting en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by