Skip to content
Lukas Sigrist edited this page Aug 18, 2021 · 36 revisions

RocketLogger Matlab Support

Note: As of RocketLogger version 2.0.0, MATLAB support is deprecated and the RocketLogger Python Support Library is recommended instead for processing measurement data files.

Data Class (rld)

  • Read RLD file:[ obj ] = rld(file_name, decimation_factor)
    • For data files > 1 GB, it is highly recommended to decimate the data during reading (otherwise, Matlab will use a huge amount of memory).
  • Plot channels: plot(channel, absolute_time, pretty_plot)
  • Get channel names: [ names ] = get_channels()
  • Get channel data: [ values ] = get_data(channel)
  • Get timestamp of samples: [ timestamps ] = get_time(absolute_time)
  • Merge current channels: [ obj ] = merge_channels()

Calibration Class (rl_cal)

  • Write calibration file: write_file(filename)
  • Read values from calibration file: [ obj ] = from_file( filename )
  • Fix calibration signs: fix_signs()
  • Calibrate: [ obj ] = calibrate( v_rld, i1l_rld, i1h_rld, i2l_rld, i2h_rld, plotPareto )

Usage Example

File Reading

% read in RLD-file
data = rld('data.rld');

% decimated reading (for large files)
data = rld('data.rld', 100);

% show all sampled channels
channel_cell = data.get_channels();

If the data file is split, use the name of the first file (without _p#) and Matlab will automatically read in all part-files available. If the entered filename is a part-file, Matlab will only read in the specified file.

Plotting

% plot all channels
data.plot('all');

% plot all analog channels
data.plot();

% plot all digital channels
data.plot('digital');

% selective plots
data.plot({'DI3', 'V2', 'I1L', 'I1L_valid'});

% plot all voltages
data.plot('voltages');

% merge and plot current channels
merged_data = data.merge_channels();
merged_data.plot('currents');

% plot channels with absolute time (may take a while)
data.plot('all', 1);

Data/Time Extraction

% extract channel data (as matrix) for further processing
values = data.get_data({'V1', 'V2'});

% extract absolute timestamp-array
timestamps = data.get_time(1);