Disable Parsim Warning Messages

1 次查看(过去 30 天)
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 个评论
Steven Lord
Steven Lord 2024-6-3
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Troubleshooting 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by