Question
I have a model and a corresponding SIL/PIL test harness in which I have enabled the 'CodeExecutionProfiling' option in the model Configuration Parameters. If I simulate the test harness normally, the 'ExecutionTime' object is created and stored in the variable 'executionProfile'. However, when I a SIL/PIL equivalence test in Test Manager, the object is not created. How can I retrieve the 'ExecutionTime' object upon completion of my test case?
Expert Answer
Kshitij Singh
PhD Expert
Answered Aug 14, 2026
The 'executionProfile' variable is saved as a property of the 'Simulink.SimulationOutput' object in the test case and can be accessed using the 'Custom Criteria' section of the test case.
The following code provides two ways of obtaining the 'executionProfile' variable and should be entered into the 'Custom Criteria' section of the test case:
% Get the ExecutionTime object
executionProfile = test.sltest_simout.executionProfile;
% Option 1: Save as a MAT file
save('executionProfile.mat','executionProfile');
% Option 2: Assign in the base workspace
assignin('base','executionProfile',executionProfile);
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related executionprofile Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →