Access Simulation Results in Simulink
After you simulate a SerDes system in Simulink®, you can view the simulation results in the Init Statistical and Time Domain Analysis Results window.

The results are also send as outputs in the model workspace in MATLAB®. To access these simulation results, first get the contents of the model workspace. Then, you can access the post-simulation results and metrics.
mws = get_param(gcs,'ModelWorkspace'); SerDesResults = mws.getVariable('SerDesResults');
Note
You must have simulation results available to access them.
To display the statistical analysis results, in the command window, type:
disp(SerDesResults.Statistical.summary)

To display the time domain analysis results, in the command window, type:
disp(SerDesResults.TimeDomain.summary)

You can use these results to customize the script you created to analyze the SerDes system.