User`s guide

getlog
Purpose All or part of output logs f rom target object
Syntax MATLAB command line
log = getlog(target_object, 'log_name', first_point,
number_samples, decimation)
Arguments
log
User-defined MATLAB variable.
'log_name'
Values are TimeLog, StateLog, Ou tpu tLog,or
TETLog. This argument is required.
first_point
First data point. The logs begin w ith 1. This
argument is optional. Default is 1.
number_samples
Number of samples after the start tim e. This
argument is optional. Default is all points in log.
decimation
1 returns all sample points. n returns every nth
sample point. This argument is optional. Default
is 1.
Description Use this function instead of the function get when you w an t only part
of the data.
Examples To get the first 1000 points in a log,
Out_log = getlog(tg, 'TETLog', 1, 1000)
To get every other point in the output log and plot values,
Output_log = getlog(tg, 'TETLog', 1, 10, 2)
Time_log = getlog(tg, 'TimeLog', 1, 10, 2)
plot(Time_log, Output_log)
See Also xPC Target target object method get (target application o bject).
The procedure “Entering the Real-Time Workshop Parameters”.
18-57