Glossary Item Box

NeuroScript MovAlyzeR Help Send comments on this topic.

Using MovAlyzeR data in Matlab

Using MovAlyzeR data in Matlab®

 

Matlab can be used either as a post-processing tool or integrated with MovAlyzeR's processing modules. To see how to integrate Matlab into the data processing and analysis stage of MovAlyzeR, please see External Processing Support in MovAlyzeR.

Data recorded in MovAlyzeR can be easily imported into Matlab®  and processed using user generated scripts. All data files output by MovAlyzeR are in standard space delimited ASCII format.
For eg: The .hwr raw data file recorded by MovAlyzeR can be accessed at the location UserRootDir\EEE\GGG\SSS\EEEGGGSSSCCCNN.HWR where

EEE = Experiment ID,
GGG = Group ID,
SSS = Subject ID,
CCC = Condition ID and
NN = Trial number

A sample MATLAB script to read in x, y coordinates and pressure information

hwrdata = dlmread('UserRootDir\EEE\GGG\SSS\EEEGGGSSSCCCNN.HWR ');

% x,y coordinates

x = hwrdata(:,1);

y = hwrdata(:,2)

% z axial pen pressure in tablet units

z = hwrdata (:,3);


 

 

 

 

 

 

 

 

Similar scripts can be used to read in the .TF file that has the filtered, processed data and the .EXT files which have the extracted kinematic features.

function tf2excel(filename)

% This program parses a .tf file (output from Movalyzer) and saves the
% data in an Excel readable file
.

fin = fopen(filename,'r');
% Read line-by-line. Number of parameters is fixed for simplicity.
for i=1:18
% Strip the header and append
header = strread(fgetl(fin),'%s','delimiter',' ');
total_dat(1,i) = header(2);
% Read data and form array
total_dat(2:1+str2num(cell2mat(header(1))),i) = strread(fgetl(fin),'%s','delimiter',' ');
end

% Open output file and write data
xlswrite([filename(1:end-3) '.xlsx'],total_dat);
fclose('all');




 

 

 

 

 

 

 

 

 

 

 

 

 

To read a .EXT file in Matlab® simply use

extdata = dlmread('UserRootDir\EEE\GGG\SSS\EEEGGGSSSCCCNN.HWR ');



 

The columns of the variable "extdata" in the script above contain the extracted parameters. 

For further discussions and demo programs on using MovAlyzeR data in Matlab®, kindly visit the How Do I? section of the online NeuroScript forum. 

Matlab® is a registered trademark of The MathWorksTM

 

 


© NeuroScript LLC. All Rights Reserved.