Disable Parsim Warning Messages
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Steven Lord
le 3 Juin 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.
Réponses (0)
Voir également
Catégories
En savoir plus sur Troubleshooting dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!