During simulation, you can:
Import input signal and initial state data from a workspace or file.
Export output signal and state data to a workspace or file.
Exporting (logging) simulation data provides a baseline for analyzing and debugging a model. Use standard or custom MATLAB® functions to generate simulated system input signals and to graph, analyze, or otherwise postprocess the system outputs.
Also, import data into a model for testing and analysis.