Disable Parsim Warning Messages
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’);
endI 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 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 parallel computing toolbox, simscape MATLAB Answers — New Questions