EEGLAB ببساطة
أساسيات MATLAB لـ EEGLAB
المحطة 0 · الدرس 3 · EEGLAB 2026.1
من الواجهة
- Command WindowWorkspaceCurrent Folder
- New ScriptHome
- RunEditor
.mdemo_basics
السكربت
demo.srate = 128; % sampling rate (samples per second)
demo.nbchan = 3; % number of channels
demo.pnts = 10 * demo.srate; % samples per channel
demo.labels = {'Fz', 'Cz', 'Pz'}; % channel names (a cell array of text)
demo.data = randn(demo.nbchan, demo.pnts); % random numbers, channels x samples
size(demo.data) % rows = channels, columns = samples
demo.srate % one field
demo.labels{2} % text of the second channel name
firstSamples = demo.data(2, 1:5)
t = (0:demo.pnts-1) / demo.srate;
t(end)
figure;
plot(t, demo.data(2, :));
xlabel('Time (s)'); ylabel('Amplitude');
title(['Channel ' demo.labels{2}]);
whos demo % size and type of a variable
which plot % location of a function on the pathأي قيمة أختار؟
| تكتب | المعنى | مثال من الدروس |
|---|---|---|
a = 5 | أنشئ متغيّراً واطبع قيمته | x = 5 |
a = 5; | نفس الشيء بلا طباعة | EEG = pop_eegfiltnew(EEG, 'locutoff', 0.1); |
s.name | حقل داخل struct | EEG.srate |
m(2, 1:5) | عناصر من مصفوفة بالأقواس العادية | EEG.data(1, 1:10) |
c{2} | محتوى خانة من cell array بالأقواس المعقوفة | demo.labels{2} |
'text' | نص بين علامتي تنصيص مفردة | 'locutoff' |
% | كل ما بعده في السطر تعليق لا يُنفّذ | % high-pass |
help name | شرح دالة في الـ Command Window | help pop_eegfiltnew |