In order to get anything back from an execution, we have to request that something be logged. In order that those logs not be empty, we have to ask the system to execute for some non-zero time period.


  • Turn on logging for all output ports of a system.
  • Set execution stop time to greater than zero.
  • Call brahms to execute the system.



This example, along with the others in this section, can be found in the script developing_systems.m in the support/tutorial/system/matlab folder.

M Source Code (against 995)
% section header disp([10 '=== Turn On Logging ===' 10]) % turn on logging for all output ports exe.all = true; % set execution stop time exe.stop = 1; % view the non-default execution exe % execute the system out = brahms(sys, exe); % view the system outputs out out.src

Expected Output

Matlab Console
=== Turn On Logging === -------------------------------- BRAHMS execution object -------------------------------- Name: (not set) Title: (not set) Precision: 6 Window: (not set) Encapsulate All: false Log All: true Seed: (not set) Addresses: Affinity: (not set) Execution Stop: 1 Working Directory: (not set) Launch Line: brahms ((MATLAB)) ((EXECFILE)) ((ARGS)) System File (In): unnamed-sys.xml System File (Out): (not set) Execution File: unnamed-exe.xml -------------------------------- out = src: [1x1 struct] ans = out: [1 2 3 4 5 6 7 8 9 10]