
% BALANCE
% 
% When a human experiences a balance disturbance, muscles throughout the
% body are activated in a coordinated fashion to maintain upright stance. We
% are interested in uncovering the sensorimotor mechanisms responsible for
% coordinating this automatic postural response (APR). Our approach is to
% perturb the balance of a human subject standing upon a customized
% perturbation platform that translates in the horizontal plane. We
% investigated the scaling of the muscle response with the characteristics
% of the perturbation.
% 
% 
% Platform motion characteristics spanned a range of peak velocities (5 cm/s
% steps between 25 and 40 cm/s) and accelerations (0.1g steps between 0.2
% and 0.4g) that were randomly varied in both forward and backward
% directions for a total of 24 perturbation types. We collected five
% replicates of each perturbation type during the experimental sessions.
% Surface electromyogram (EMG) signals, which indicate the level of muscle
% activation, from eleven muscles in the legs and trunk were collected at
% 1080 Hz. Raw EMG signals were high-pass filtered at 35 Hz (3rd order
% zero-lag Butterworth filter), demeaned, half-wave rectified, and low-pass
% filtered at 40 Hz (1st order zero-lag Butterworth filter).
% 
% The data included here represent processed EMG responses to
% backward-directed perturbations in the medial gastrocnemius muscle (an
% ankle plantar flexor located on the calf) for all experimental conditions.
% There is one second of data, beginning at platform motion onset."
% 
% Torrence D.J. Welch, MSE
% Graduate Research Assistant / PhD Candidate
% Laboratory for Neuroengineering
% Wallace H. Coulter Department of Biomedical Engineering
% 
load('C:\Springer\Descriptive\Descriptivedat\balance2.mat')
%load balance2  
%balance2 contains data set: data of size 1024 x 3 x 4
% data(:,1,1), data(:,1,4), data(:,1,7) and data(:,1,10)
% correspond to fixed acceletation = 0.2 and velocities
% = 25, 30, 35, and 40.
bal25 = data(:,1,1);  
bal30 = data(:,1,4);
bal35 = data(:,1,7);
bal40 = data(:,1,10);%------------------
X = [bal25 bal30 bal35 bal40];
varNames = {'veloc25','veloc30','veloc35','veloc40'};

% covariances and correlations
cov(X)
%corr(arryth, icu)

figure(1)
gplotmatrix(X,[]);
% print -depsc 'C:\Brani\Courses\bmestatu\Fall2007\arry1.eps'

figure(2)
parallelcoords(X,   'standardize','on', 'labels',varNames)
set(gcf,'color','white');
%print -depsc 'C:\Brani\Courses\bmestatu\Fall2007\arry2.eps'


figure(4)
andrewsplot(X, 'standardize','on')
set(gcf,'color','white');

%print -depsc 'C:\Brani\Courses\bmestatu\Fall2007\arry4.eps'

figure(5)
h = glyphplot(X, 'glyph','star', 'varLabels',varNames,...
'Grid',[4,4],'Page',2);

set(h(:,3),'FontSize',5); set(gcf,'color','white');
%print -depsc 'C:\Brani\Courses\bmestatu\Fall2007\arry5.eps'

figure(6)
h = glyphplot(X, 'glyph','face', 'varLabels',varNames,...
'Grid',[4,4],'Page',1);

set(h(:,3),'FontSize',10);  set(gcf,'color','white');
%print -depsc 'C:\Brani\Courses\bmestatu\Fall2007\arry6.eps'




