-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtestScript_correlations.m
36 lines (30 loc) · 1.19 KB
/
testScript_correlations.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
%% testScript_correlations.m
%
% MDT
% 2016.02.08
% Version 1.0
%% Introduction
%
% This is an EEGBlocks example/test script. These scripts are designed to
% show how the blocks work together. To try your own data on it, manually
% build a "chunk" or eegDataBlob (we usually call them chunks in scripts
% and eegDataBlobs in functions) that (minimally) has the fields "data"
% which holds the data in a time X channel array. This is the TRANSPOSE of
% how eeglab stores it!
%
% Most testScripts use preformatted data from our laboratory. These are not
% stored on the Github for a variety of reasons, so if something is
% missing, contact the authors for data.
%% Correlations
%
% This script loads some data and runs a simple correlational analysis on
% it to show the effect of removing the medians.
%
load ebExampleData % This file ebExampleData.mat must be on the path!
originalDataCorr = corr(exampleChunk.data);
newChunk = ebMedianRemove(exampleChunk);
medianDataCorr = corr(newChunk.data);
origDataHM = HeatMap(originalDataCorr);
origDataHM.addTitle('Original Data Channel Correlations');
medRemDataHM = HeatMap(medianDataCorr);
medRemDataHM.addTitle('Median Removed Channel Correlations');