To import data from Simulink to MATLAB, you first need to save the data from Simulink to the workspace:
main.m28 chars2 lines
model_name
with the name of your Simulink model.simout
will contain the simulation output data.To plot the imported data using the stairs
function:
main.m34 chars2 lines
stairs
function.Note: Make sure that the Simulink model is saved and closed before importing the data to MATLAB.
gistlibby LogSnag