This article describes and shows the step-by-step setup process for Simcenter 3D Motion Results Reader (MRR) COM interface for MATLAB, in order to perform post-processing operations using the Motion Results in MATLAB through scripting.
The Motion Results Reader COM for MATLAB package is a COM server that lets you open and browse Motion Results files from MATLAB.
The following setup steps are also shown in the video.
For using the Motion Results Reader interface in MATLAB, it must be first initialized as an Active X Server object.
Note that if the MRR COM setup was not completed successfully, the initialization step will fail, as the required *.dll files will not be found by MATLAB in the registry.
Use the following commands in MATLAB to initialize Motion Results Reader and load a set of results file (*.mres file) of your choosing:
% This is a comment.
%% Initialize MRR by starting an Active X Server
% Assumes MRR was added to the Registry during the 1-time setup
mres_file = actxserver("MotionResultsFile.object");
%% Load results file to the initialized object.
mres_file.OpenFile("MyResults.mres");
This functionality (Motion Results Reader COM for MATLAB) and its workflow should not be confused with the Mechatronics Co-simulation with MATLAB topic. The Motion Results Reader COM for MATLAB functionality can be used for post-processing any sets of Motion Results (*.mres) by MATLAB scripting, independent of how the results were obtained.