| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → xPC Target |
| Contents | Index |
| Learn more about xPC Target |
MATLAB command line
log = getlog(target_object, 'log_name', first_point, number_samples, decimation)
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. |
Use this function instead of the function get when you want only part of the data.
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)
xPC Target target object method get (target application object).
The procedure Entering the Real-Time Workshop Parameters.
![]() | getfilesize | getparam | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |