EEG data Visualization for .mat file

12 views (last 30 days)
I have an EEG data stored as . mat file , I want to visualize the EEG , What command should I use?
the sampling rate = 500
num of channels = 66
num of points = 250734
sample file is attached as image because the file size is too much big.

Accepted Answer

Star Strider
Star Strider on 7 Aug 2024
There are a few ways to do this.
Two approaches —
Fs = 500;
L = 250734;
t = seconds(linspace(0, L-1, L).'/Fs);
EEG = randn(L, 66);
VN = compose('Ch. %2d',1:66);
EEG_Table = array2table([t,EEG]);
EEG_Table.Properties.VariableNames = {'Time', VN{:}}
EEG_Table = 250734x67 table
Time Ch. 1 Ch. 2 Ch. 3 Ch. 4 Ch. 5 Ch. 6 Ch. 7 Ch. 8 Ch. 9 Ch. 10 Ch. 11 Ch. 12 Ch. 13 Ch. 14 Ch. 15 Ch. 16 Ch. 17 Ch. 18 Ch. 19 Ch. 20 Ch. 21 Ch. 22 Ch. 23 Ch. 24 Ch. 25 Ch. 26 Ch. 27 Ch. 28 Ch. 29 Ch. 30 Ch. 31 Ch. 32 Ch. 33 Ch. 34 Ch. 35 Ch. 36 Ch. 37 Ch. 38 Ch. 39 Ch. 40 Ch. 41 Ch. 42 Ch. 43 Ch. 44 Ch. 45 Ch. 46 Ch. 47 Ch. 48 Ch. 49 Ch. 50 Ch. 51 Ch. 52 Ch. 53 Ch. 54 Ch. 55 Ch. 56 Ch. 57 Ch. 58 Ch. 59 Ch. 60 Ch. 61 Ch. 62 Ch. 63 Ch. 64 Ch. 65 Ch. 66 _________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ ______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ ______________ _______________ ______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ ______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ ______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ _______________ 0 sec -47360 sec 3.2095e+05 sec 1.1761e+05 sec 1.2661e+05 sec -1.48e+05 sec 1.4832e+05 sec 17446 sec 1.4335e+05 sec 28167 sec 1.0844e+05 sec -73888 sec 7066.6 sec -445.55 sec -12127 sec -1.0685e+05 sec 7268.7 sec -1.2012e+05 sec -1.328e+05 sec -7506.7 sec 72946 sec -83963 sec -1.1134e+05 sec 1.8201e+05 sec -83903 sec -1.1134e+05 sec 19260 sec 1.3701e+05 sec 5322 sec 71486 sec -52278 sec -19480 sec 67870 sec 21618 sec -42957 sec -28592 sec -58337 sec -10506 sec 59641 sec -87540 sec 1.3428e+05 sec -62832 sec -1.2275e+05 sec -1.5812e+05 sec -1.1286e+05 sec 43731 sec -74440 sec -24739 sec 66746 sec -45915 sec 35504 sec 54005 sec -82434 sec 41271 sec -57127 sec -1.6801e+05 sec -20425 sec -1.3976e+05 sec 59990 sec -59227 sec -36039 sec -73424 sec 76768 sec -63846 sec -1.7716e+05 sec 24440 sec -1.9248e+05 sec 0.002 sec -1.3088e+05 sec -1.4675e+05 sec 96423 sec -80899 sec -1.7758e+05 sec 90348 sec -21344 sec 2.0486e+05 sec 21907 sec 1.9035e+05 sec -68512 sec -1.9611e+05 sec 64713 sec 60720 sec 66232 sec -1.2343e+05 sec 64715 sec -70147 sec 41169 sec -35056 sec -876.02 sec -37813 sec -1.9947e+05 sec -53356 sec -25837 sec 1.273e+05 sec -37522 sec -80579 sec 29230 sec 60876 sec -11334 sec -1.1667e+05 sec 1.4419e+05 sec -9926.3 sec -79870 sec 23244 sec 8172.3 sec -1.7759e+05 sec -63984 sec 29524 sec 28587 sec 1324.1 sec -95355 sec -1.1685e+05 sec -1.3972e+05 sec -1.4777e+05 sec 14306 sec 36639 sec 30431 sec 1.0251e+05 sec 1.3791e+05 sec -4330.8 sec 12760 sec -62715 sec 1.1045e+05 sec 37286 sec -1.1199e+05 sec 31122 sec 14934 sec 49359 sec 29612 sec 1.8247e+05 sec 1.1822e+05 sec 17437 sec 19890 sec 59435 sec 0.004 sec 1.7889e+05 sec 11738 sec 51151 sec -34087 sec -3815.5 sec 25977 sec 9552.8 sec -1.2674e+05 sec -1.6305e+05 sec -27678 sec -39245 sec -75840 sec -85803 sec 14134 sec -7986.3 sec -1.124e+05 sec -64732 sec -1.1147e+05 sec -1.4994e+05 sec 5191 sec -89403 sec -30352 sec 91098 sec 67602 sec 49839 sec -1.072e+05 sec -91776 sec 69405 sec 1.1466e+05 sec -60693 sec 23477 sec -99415 sec -28058 sec 55214 sec 6920.2 sec 55934 sec 1.1529e+05 sec 78483 sec 1156.8 sec 11606 sec -57568 sec 76002 sec -1.4087e+05 sec -1.0305e+05 sec -1.1169e+05 sec 12685 sec 1.9782e+05 sec 46273 sec 10405 sec 13220 sec 31868 sec -21530 sec 23478 sec -1.0472e+05 sec 2.3645e+05 sec -1.375e+05 sec 8092.4 sec -61243 sec 35355 sec -87450 sec -17024 sec 773.78 sec -1.4875e+05 sec 1.0603e+05 sec 22430 sec -51805 sec 0.006 sec -55488 sec -43076 sec -1.2132e+05 sec 1.2496e+05 sec 1.0875e+05 sec -45429 sec 1.7369e+05 sec -60399 sec -6029.5 sec 73690 sec 4509 sec 1.008e+05 sec -1.5347e+05 sec 92074 sec 20751 sec -57484 sec 43131 sec -1.1108e+05 sec -1.9901e+05 sec 68155 sec 1281.9 sec 1.0483e+05 sec -1.9741e+05 sec 1.2426e+05 sec 51799 sec -66940 sec 1.0568e+05 sec 59369 sec -93345 sec 19801 sec 59021 sec -45583 sec 937.82 sec -1.3893e+05 sec 19410 sec 69366 sec 41897 sec -84855 sec 2.0096e+05 sec -1.6631e+05 sec -1.0384e+05 sec 39991 sec 11436 sec 36325 sec 84602 sec -11548 sec 41416 sec 93534 sec -1.3241e+05 sec -97611 sec 82498 sec -1.071e+05 sec 1.5532e+05 sec 50604 sec -20968 sec 12484 sec 63345 sec 37866 sec -78962 sec 2636.8 sec 3465.2 sec -87103 sec 6733.5 sec 23835 sec 1.075e+05 sec 35909 sec 0.008 sec -80131 sec 7987.1 sec 1.3621e+05 sec -45688 sec 17699 sec 68441 sec -1.902e+05 sec -66359 sec -1.0012e+05 sec 23606 sec -88538 sec -1849.7 sec 23655 sec -48125 sec 1.6562e+05 sec 75739 sec -1.724e+05 sec -60122 sec -4106.2 sec -40306 sec 1.6584e+05 sec 22240 sec -86443 sec 22978 sec 28926 sec 12599 sec -44583 sec -21427 sec 8031.6 sec 96562 sec -1.9353e+05 sec 3284.7 sec -1.4687e+05 sec -28367 sec 1389.5 sec 1.4313e+05 sec 54323 sec 10400 sec 3551.6 sec 1.1771e+05 sec 28550 sec -44799 sec -82900 sec 77167 sec 24319 sec 66023 sec 41503 sec -18251 sec 45583 sec -60595 sec -1.2264e+05 sec 16447 sec -7469.9 sec -50543 sec -61857 sec 78661 sec 1.8872e+05 sec 51802 sec -1.0904e+05 sec -21654 sec 19624 sec 74658 sec -90316 sec -75794 sec 99797 sec -1.1342e+05 sec 0.01 sec 1.3644e+05 sec 43957 sec 22706 sec -60924 sec 1.0183e+05 sec -6737.5 sec -1.7596e+05 sec 89686 sec -12972 sec 69217 sec -1.5139e+05 sec -21669 sec 22374 sec 95842 sec 66569 sec 1.1749e+05 sec 1.4503e+05 sec 36308 sec -75411 sec -56899 sec 1.5681e+05 sec 2.1419e+05 sec -1.2577e+05 sec 27842 sec -11023 sec 64720 sec -2148.3 sec -27368 sec -68167 sec -37249 sec -56318 sec 29336 sec 63769 sec 14307 sec -99932 sec -2.246e+05 sec 1.4497e+05 sec -36027 sec -9709.9 sec 26177 sec -1.7062e+05 sec 18027 sec -88477 sec -1.1963e+05 sec 12303 sec -1.0446e+05 sec 1.3022e+05 sec 1.2597e+05 sec 1.2898e+05 sec 1.6161e+05 sec -25840 sec 88815 sec 63406 sec 14289 sec 19217 sec 61926 sec 19492 sec -53354 sec -81853 sec -59000 sec 24364 sec -1.2727e+05 sec -4245.3 sec 87034 sec 1.9526e+05 sec 10261 sec 0.012 sec -1.3827e+05 sec 2.1548e+05 sec 95954 sec -1.3607e+05 sec 77631 sec -22519 sec -66233 sec -1.4323e+05 sec 1.2866e+05 sec -71786 sec 1.4166e+05 sec 73178 sec -49211 sec -1.138e+05 sec -1.8152e+05 sec -8351.3 sec -1.0468e+05 sec -83938 sec -45276 sec -9652.6 sec 70083 sec -43379 sec -28682 sec -56793 sec -22291 sec 71231 sec 66784 sec -1.3419e+05 sec 82153 sec -1.0679e+05 sec 6016.4 sec -1.2556e+05 sec -21748 sec 46436 sec 34759 sec 39617 sec 54582 sec -29629 sec 1.4297e+05 sec 27868 sec 1048.2 sec -1.5855e+05 sec -2.0126e+05 sec 69967 sec 72792 sec -43394 sec 20535 sec 40859 sec -77223 sec -10785 sec -27900 sec -99464 sec -90886 sec -1.9062e+05 sec 36488 sec -85185 sec -21069 sec 1.1633e+05 sec 33295 sec -88001 sec 2652.5 sec 72248 sec -2.2447e+05 sec -1.5429e+05 sec 1.3366e+05 sec 16216 sec 0.014 sec -92429 sec -8873.3 sec 23797 sec -67685 sec 2.1058e+05 sec -13063 sec -1.6739e+05 sec -80724 sec 1.1058e+05 sec 87910 sec -59771 sec 22615 sec -67600 sec 76115 sec -75560 sec -32310 sec -46254 sec 90034 sec 1.7991e+05 sec 66174 sec 18904 sec -47476 sec 3215 sec -56926 sec -92136 sec -17489 sec 747.99 sec -50425 sec -13930 sec 27920 sec 39574 sec -57150 sec -1.2548e+05 sec -80407 sec -23964 sec -58861 sec -74701 sec 2.3204e+05 sec -32001 sec 61805 sec -36106 sec 43549 sec -1.4888e+05 sec 59401 sec -25043 sec 53014 sec -58257 sec -46957 sec 87563 sec 1.044e+05 sec 62286 sec 16066 sec 94232 sec -1.3354e+05 sec -52384 sec -1.9802e+05 sec -39499 sec -41869 sec -2.4782e+05 sec 62044 sec -2.0474e+05 sec 43903 sec -27262 sec -69387 sec 1.5284e+05 sec -48926 sec 0.016 sec -61589 sec -23485 sec 1.8796e+05 sec -98513 sec -1.1949e+05 sec -39876 sec -1.1925e+05 sec 67904 sec -80744 sec -51013 sec -1.4422e+05 sec 1.6061e+05 sec -1.3143e+05 sec -8903.7 sec 1.406e+05 sec -45840 sec -41265 sec 51381 sec 2.0133e+05 sec -1.536e+05 sec -39297 sec -97656 sec 1.0621e+05 sec -16738 sec -9113.4 sec 230.28 sec 1.0132e+05 sec -1.0645e+05 sec 75713 sec -9667.6 sec -1906.5 sec 96269 sec 61073 sec 32662 sec 1.0896e+05 sec 44197 sec 1.7807e+05 sec -56202 sec -92352 sec -22792 sec -1.4284e+05 sec 93654 sec 32523 sec 31291 sec 52134 sec 68276 sec 96144 sec -34572 sec -52288 sec -53559 sec 83190 sec 4165.3 sec -2.8951e+05 sec -1.4193e+05 sec -73609 sec 27922 sec 1.067e+05 sec 1.0182e+05 sec 37739 sec -52902 sec -65746 sec 78880 sec -16386 sec 99490 sec -1.0967e+05 sec 7534 sec 0.018 sec -45001 sec 82107 sec -1.0497e+05 sec 25625 sec -67883 sec -90919 sec -49490 sec 29797 sec 74098 sec 78493 sec -47771 sec 1.7842e+05 sec -22279 sec 18545 sec 1.5989e+05 sec 1.2957e+05 sec -87635 sec -70344 sec 78060 sec -18651 sec 11567 sec 5261.3 sec 1.5924e+05 sec -11640 sec 53602 sec 49457 sec -68135 sec -92548 sec -77459 sec 6502.8 sec -10098 sec 48027 sec 20538 sec 34355 sec 41856 sec 77131 sec 95521 sec -11758 sec 29955 sec -72288 sec 13899 sec 10855 sec -60963 sec 7688.1 sec 1.1301e+05 sec 85033 sec 24888 sec -1.0129e+05 sec -49748 sec -1.0474e+05 sec 53663 sec -1749.4 sec -44868 sec -66022 sec 78550 sec 1.2009e+05 sec -17899 sec -55864 sec 49356 sec -35545 sec 61193 sec 91989 sec 1.1998e+05 sec -1.1112e+05 sec -9744.4 sec 40775 sec 0.02 sec 18727 sec -4626 sec 1.5499e+05 sec 16548 sec -1.3559e+05 sec 76563 sec 1.2179e+05 sec 94197 sec 93253 sec 36890 sec -6281.7 sec 86936 sec -59185 sec 1.2216e+05 sec 54492 sec 6177.1 sec -1.0737e+05 sec -33918 sec 1.6597e+05 sec 42837 sec 5692.5 sec 60315 sec -77610 sec -65300 sec 1.5641e+05 sec 81723 sec -24725 sec -1.1419e+05 sec -37528 sec -26632 sec -28858 sec 73283 sec 79403 sec 31682 sec 91336 sec 7111.3 sec -7232.7 sec 1.5298e+05 sec -61192 sec -98428 sec -98985 sec 34575 sec 34784 sec 93689 sec 70862 sec -91405 sec -1.1485e+05 sec -87414 sec -6848.4 sec 19212 sec 721.44 sec 16391 sec 3630.6 sec -16414 sec 2579.5 sec 1.6107e+05 sec -18242 sec 49323 sec -2165.5 sec -49359 sec 5963.3 sec -92702 sec 49974 sec 1.6138e+05 sec -68240 sec -1.501e+05 sec 0.022 sec -16947 sec -1.1364e+05 sec -35178 sec 1.7781e+05 sec -76854 sec 55251 sec -1.4696e+05 sec -67013 sec 69460 sec -81988 sec -47839 sec 79207 sec -1.2458e+05 sec -69706 sec 35131 sec 1.1385e+05 sec 1.7288e+05 sec -71026 sec -1.0552e+05 sec 12566 sec 56235 sec -1974.4 sec -73669 sec -1.8092e+05 sec 13271 sec -78304 sec 80980 sec 38513 sec 1.3662e+05 sec -1.5173e+05 sec -19358 sec 1.1221e+05 sec 97965 sec -1.0321e+05 sec 95652 sec 12817 sec -38994 sec 54421 sec -1.3877e+05 sec -1.6734e+05 sec 10251 sec -64209 sec -3059.2 sec -86750 sec -14670 sec -1.1964e+05 sec 1.206e+05 sec 27113 sec -34915 sec -7017.6 sec -1.3405e+05 sec 63486 sec -1.9948e+05 sec -91967 sec 73285 sec 1.4232e+05 sec -25358 sec 56954 sec 41832 sec -1.1305e+05 sec 61608 sec 79550 sec 91503 sec -53157 sec 1.2228e+05 sec -1.1452e+05 sec 0.024 sec -92910 sec -1.1338e+05 sec -56469 sec 34535 sec 59097 sec -82360 sec -38126 sec 48422 sec 65043 sec -45856 sec -1.5314e+05 sec -71821 sec 51028 sec -1.4548e+05 sec 86910 sec -70419 sec 70858 sec 89249 sec 1.1627e+05 sec -2.1507e+05 sec -1.3684e+05 sec 47448 sec -45847 sec 75212 sec 1.0296e+05 sec 49532 sec -52449 sec -75786 sec -82801 sec -60671 sec -20723 sec -12921 sec -88370 sec 50032 sec -20717 sec 1.0122e+05 sec 84487 sec -41168 sec 45354 sec -19300 sec -40602 sec 1.4881e+05 sec -97821 sec -37080 sec 19897 sec 68176 sec 1.0078e+05 sec 1.0219e+05 sec 18758 sec 73649 sec 71249 sec -65746 sec -93665 sec -22649 sec 85585 sec 74753 sec -97604 sec 50199 sec -66721 sec -12660 sec -96711 sec 12590 sec -59065 sec 68665 sec 1.3304e+05 sec 65675 sec 0.026 sec 85576 sec -57404 sec -64802 sec 51685 sec 1.1048e+05 sec 1307.8 sec -1.4929e+05 sec 1.2625e+05 sec 1.5649e+05 sec -45144 sec -55031 sec -93123 sec 5642.5 sec 1.5648e+05 sec 79152 sec -732.88 sec -1.3697e+05 sec 43120 sec -37594 sec -87574 sec 1.3702e+05 sec -73742 sec -97798 sec 44176 sec 23977 sec 1.353e+05 sec 75938 sec -58942 sec 1.1832e+05 sec -85057 sec -2292.8 sec -49940 sec 2075.1 sec -13734 sec -7376.2 sec 90446 sec -41398 sec 9020.1 sec 35817 sec -1.8301e+05 sec -10080 sec 46869 sec -1.4101e+05 sec 23805 sec -38106 sec -9596.1 sec -47165 sec 2.4708e+05 sec -17968 sec -86698 sec -73668 sec 10616 sec 46086 sec 96644 sec 15025 sec 58232 sec -1.5662e+05 sec -1.1054e+05 sec 14909 sec 1.9628e+05 sec -1.4475e+05 sec -93681 sec -7546.4 sec 1.7425e+05 sec -66175 sec -38898 sec 0.028 sec -1.0318e+05 sec -40643 sec 14223 sec -81495 sec -6254.5 sec -1.1031e+05 sec 16663 sec -31905 sec 1359.9 sec 81960 sec -13358 sec 35103 sec 13916 sec 44836 sec -28394 sec -1.0694e+05 sec -38584 sec 1.2128e+05 sec 38808 sec -67909 sec 51470 sec 4717.3 sec 92848 sec 42006 sec 53949 sec -1.7789e+05 sec 5684.9 sec -60787 sec 7550.5 sec 13374 sec 65378 sec 1486.3 sec 14597 sec 51642 sec -1.0343e+05 sec -1.2396e+05 sec 1.5185e+05 sec 1.2612e+05 sec 6074.9 sec -1.4076e+05 sec 82122 sec 42075 sec -83208 sec 35971 sec -56627 sec -12889 sec -86558 sec 18761 sec -45609 sec 47889 sec -1.1661e+05 sec 97979 sec -67853 sec -50416 sec 51867 sec 44396 sec 1.5538e+05 sec 4479.4 sec 86101 sec 39629 sec -25357 sec 16390 sec 29592 sec -23013 sec 69884 sec -14348 sec 0.03 sec -1.3113e+05 sec 29665 sec -1.2542e+05 sec -1.3666e+05 sec 26222 sec -1.0373e+05 sec -2.2912e+05 sec 89292 sec -6967.9 sec -10547 sec -46587 sec 1.1519e+05 sec 79062 sec 88939 sec 1460.3 sec -4396.9 sec 1.2172e+05 sec 98254 sec 32859 sec -65229 sec 1.0156e+05 sec -1.362e+05 sec 1.2897e+05 sec 40677 sec 96431 sec 2.6059e+05 sec -63646 sec 99583 sec -27000 sec -1.1523e+05 sec -46766 sec -85167 sec -69083 sec -1.7111e+05 sec -13130 sec 82774 sec 70634 sec -61552 sec -1.1309e+05 sec 59135 sec 58147 sec 1.1786e+05 sec -851.86 sec 14761 sec -56853 sec 17720 sec 4086 sec -1.8165e+05 sec -1.0172e+05 sec -45927 sec -38908 sec -97441 sec -1.0439e+05 sec 1.2072e+05 sec -1.2977e+05 sec -39489 sec 12779 sec -30369 sec 1.482e+05 sec -1.7149e+05 sec 3957.8 sec -1.4199e+05 sec -2491.2 sec 47338 sec 21056 sec -1.3848e+05 sec
EEG_TimeTable = table2timetable(EEG_Table);
figure
stackedplot(EEG_TimeTable)
VN = EEG_Table.Properties.VariableNames;
V = reshape((1:66),[],6).';
V = V(:);
figure
tiledlayout(11,6)
for k = 1:size(EEG_Table,1)-1
nexttile
plot(EEG_Table{:,1}, EEG_Table{:,k+1})
title(VN{V(k)+1})
end
Error using nexttile
The layout does not have sufficient space.
.

More Answers (0)

Categories

Find more on EEG/MEG/ECoG in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!