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

RocketLogger Matlab Code

Data Class (rld)

  • Read RLD file:obj = rld(file_name, decimation_factor)
  • Plot channels: plot(obj, channel, absolute_time, pretty_plot)
  • Get channel names: names = get_channels(obj)
  • Get channel data: values = get_data(obj, channel)
  • Get timestamp of samples: timestamps = get_time(obj, absolute_time)
  • Merge current channels: merged_obj = merge_channels(obj)

Calibration Class (rl_cal)

  • Write calibration file: write_file(obj, filename)
  • Read values from calibration file: [ obj ] = from_file( filename )
  • Fix calibration signs: fix_signs(obj)
  • 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();
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');
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