Created
November 28, 2011 10:32
-
-
Save morganp/1399912 to your computer and use it in GitHub Desktop.
Matlab run Simulink modern syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Run simulation | |
sim_length = samples/fs_in; | |
% [answer.t, answer.x, answer.y] = sim( 'testharness', sim_length ); | |
paramNameValStruct.StartTime = '0.0' ; | |
paramNameValStruct.StopTime = num2str(sim_length) ; | |
sim_result = sim( 'testharness', paramNameValStruct); | |
%% Get the results | |
%% there is a To Workspace block outputting to 'simout' as a Structure | |
simout = sim_result.find('simout') ; | |
data = simout.signals.values ; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment