getlog - All or part of output logs from 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, OutputLog, or TETLog. This argument is required.

first_point

First data point. The logs begin with 1. This argument is optional. Default is 1.

number_samples

Number of samples after the start time. 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 want 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, ,2)
Time_log = getlog(tg, 'TimeLog', 1, ,2)
plot(Time_log, Output_log)

See Also

xPC Target™ target object method get (target application object).

The procedure Entering the Real-Time Workshop® Parameters.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS