Main Content


Read logged output messages



logTable = readLoggedOutput(ulogOBJ) reads the data of all logged output messages from the specified ulogreader object and returns a timetable that contains log levels and messages.

logTable = readLoggedOutput(ulogOBJ,Name,Value) reads specific logged output messages based on the specified name-value pairs.

Example: readLoggedOutput(ulog,'Time',[d1 d2])


collapse all

Load the ULOG file. Specify the relative path of the file.

ulog = ulogreader('flight.ulg');

Read all topic messages.

msg = readTopicMsgs(ulog);

Specify the time interval between which to select messages.

d1 = ulog.StartTime;
d2 = d1 + duration([0 0 55],'Format','hh:mm:ss.SSSSSS');

Read messages from the topic 'vehicle_attitude' with an instance ID of 0 in the time interval [d1 d2].

data = readTopicMsgs(ulog,'TopicNames',{'vehicle_attitude'}, ... 
'InstanceID',{0},'Time',[d1 d2]);

Extract topic messages for the topic.

vehicle_attitude = data.TopicMessages{1,1};

Read all system information.

systeminfo = readSystemInformation(ulog);

Read all initial parameter values.

params = readParameters(ulog);

Read all logged output messages.

loggedoutput = readLoggedOutput(ulog);

Read logged output messages in the time interval.

log = readLoggedOutput(ulog,'Time',[d1 d2]);

Input Arguments

collapse all

ULOG file reader, specified as a ulogreader object.

Name-Value Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Time',[d1 d2]

Time interval between which to select messages, specified as a two-element vector of duration, or a double array. The duration array is specified in the 'hh:mm:ss.SSSSSS' format. The double array is specified in microseconds.

Example: 'Time',[d1 d2]

Output Arguments

collapse all

Logged output messages, returned as a timetable with the columns:

  • LogLevel

  • Messages

Introduced in R2020b