Skip to content
Matthias Leubin edited this page Dec 8, 2016 · 36 revisions

RocketLogger Matlab Code

Data Class (rld)

  • Read RLD file:[ obj ] = rld(file_name, decimation_factor)
  • 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);
Clone this wiki locally