%% Create a System Exclusive Message
% System Exclusive messages are defined by a sequence of midimsg objects: SystemExclusive, Data, and EOX. To create a System Exclusive sequence, specify the SystemExclusive midimsg type during creation and then specify the bytes of the message. This syntax requires a timestamp.

bytes = [0 1 2];
timestamp = 0;
msg = midimsg('SystemExclusive',bytes,timestamp)

% You can also create the SystemExclusive, Data, and EOX midimsg objects individually. For example, the following midimsg array is the same as the preceding.

msg = [midimsg('SystemExclusive',timestamp), ...
       midimsg('Data',bytes,timestamp), ...
       midimsg('EOX',timestamp)]

% Copyright 2012 The MathWorks, Inc.