Plotting Interpolated spatial distribution of electric potentials measured from a sensor array

386 views Asked by At

I have a small footprint EEG measurement device with 8 measurement electrodes and 1 reference electrode - the reference electrode is in the center of the sensor array, 4 measurement electrodes on the corners of the 2cm x 2cm sensor array and 4 measurement electrodes in the center of the faces of the square making a pattern as given below,

X X X

X X X

X X X

Now, if I take a single or 10 contiguous and concurrent set of time samples of voltage levels from each of these 8 spatial channels, how do I create a MATLAB plot or scatter plot of Interpolated distribution of electric potentials with "hot" and "cold" regions as shown in the attached figure ?

Spatial_Distribution_UHD_EEG.

Source: http://www.sciencedirect.com/science/article/pii/S1053811913012615

Any suggestion on achieving the above would be of great help.

1

There are 1 answers

0
David On BEST ANSWER
M=-1+2*rand(3) %// sample data
[x,y]=meshgrid(0:0.5:1); %// grid for sample data
[X,Y]=meshgrid(0:0.005:1); %// grid to interpolate onto
IN=interp2(x,y,M,X,Y); %// interpolate data onto finer grid

Now the plotting (note I defined a new colormap that roughly matches with your example, it's at the bottom of the answer, just define it before doing colormap(MAP) if you want to use it).

colormap(MAP)
surf(X,Y,IN,'EdgeColor','none') %// create the surface plot
caxis([-1 1]) %// set color axxis range
colorbar
shading interp
view([0 90]) %// put view right on top of plot, looking straight down

enter image description here

MAP = [...
                   0   1.000000000000000   1.000000000000000
                   0   0.952380955219269   1.000000000000000
                   0   0.904761910438538   1.000000000000000
                   0   0.857142865657806   1.000000000000000
                   0   0.809523820877075   1.000000000000000
                   0   0.761904776096344   1.000000000000000
                   0   0.714285731315613   1.000000000000000
                   0   0.666666686534882   1.000000000000000
                   0   0.619047641754150   1.000000000000000
                   0   0.571428596973419   1.000000000000000
                   0   0.523809552192688   1.000000000000000
                   0   0.476190477609634   1.000000000000000
                   0   0.428571432828903   1.000000000000000
                   0   0.380952388048172   1.000000000000000
                   0   0.333333343267441   1.000000000000000
                   0   0.285714298486710   1.000000000000000
                   0   0.238095238804817   1.000000000000000
                   0   0.190476194024086   1.000000000000000
                   0   0.142857149243355   1.000000000000000
                   0   0.095238097012043   1.000000000000000
                   0   0.047619048506021   1.000000000000000
                   0                   0   1.000000000000000
   0.047619048506021                   0   0.952380955219269
   0.095238097012043                   0   0.904761910438538
   0.142857149243355                   0   0.857142865657806
   0.190476194024086                   0   0.809523820877075
   0.238095238804817                   0   0.761904776096344
   0.285714298486710                   0   0.714285731315613
   0.333333343267441                   0   0.666666686534882
   0.380952388048172                   0   0.619047641754150
   0.428571432828903                   0   0.571428596973419
   0.476190477609634                   0   0.523809552192688
   0.523809552192688                   0   0.476190477609634
   0.571428596973419                   0   0.428571432828903
   0.619047641754150                   0   0.380952388048172
   0.666666686534882                   0   0.333333343267441
   0.714285731315613                   0   0.285714298486710
   0.761904776096344                   0   0.238095238804817
   0.809523820877075                   0   0.190476194024086
   0.857142865657806                   0   0.142857149243355
   0.904761910438538                   0   0.095238097012043
   0.952380955219269                   0   0.047619048506021
   1.000000000000000                   0                   0
   1.000000000000000   0.047619048506021                   0
   1.000000000000000   0.095238097012043                   0
   1.000000000000000   0.142857149243355                   0
   1.000000000000000   0.190476194024086                   0
   1.000000000000000   0.238095238804817                   0
   1.000000000000000   0.285714298486710                   0
   1.000000000000000   0.333333343267441                   0
   1.000000000000000   0.380952388048172                   0
   1.000000000000000   0.428571432828903                   0
   1.000000000000000   0.476190477609634                   0
   1.000000000000000   0.523809552192688                   0
   1.000000000000000   0.571428596973419                   0
   1.000000000000000   0.619047641754150                   0
   1.000000000000000   0.666666686534882                   0
   1.000000000000000   0.714285731315613                   0
   1.000000000000000   0.761904776096344                   0
   1.000000000000000   0.809523820877075                   0
   1.000000000000000   0.857142865657806                   0
   1.000000000000000   0.904761910438538                   0
   1.000000000000000   0.952380955219269                   0
   1.000000000000000   1.000000000000000                   0];