Skip to content

load_datx

R-Broadley edited this page Jul 6, 2017 · 6 revisions

LOAD_DATX - Opens the raw data files from activpal devices

Syntax:

Data = load_datx(filePath)
Data = load_datx(filePath, 'Name', 'Value')

Description:

Data = load_datx(filePath) - loads data from binary activpal data files.

Data = load_datx(filePath, 'Name', 'Value') - modifies the output using Name, Value pair arguments.

Named arguments:
Name Details Accepted Values
'units' Specify the units for accelerometer data. 'g' (default), 'ms-2', 'raw'

Output:

A structure with two fields:

  • signals - a table with 4 columns (dateTime, x, y, z)
  • meta - a structure containing the metadata

The fields of meta are:

  • bitdepth - 8bits or 10bits
  • resolution - ±2g, ±4g or ±8g (g = 9.81 ms-2)
  • hz - the sample frequency
  • axes - the number of axes recorded
  • startTime - the start time of the recording
  • stopTime - the stop time of the recording
  • duration - the length of the recording (Matlab duration type)
  • stopCondition - Trigger, Immediately, Set Time
  • startCondition - Memory Full, Low Battery, USB, Programmed Time

Example:

[fileName, fileDir] = uigetfile( ...
    {'*.datx; *.dat', 'activPAL Files (*.dat, *.datx)'}, ...
    'Select an activPAL data file' );

filePath = fullfile(fileDir, fileName);
Data = activpal_utils.load_datx(filePath);

Requires Matlab version 8.2 (2013b) or later.

Clone this wiki locally