need help with hdr.label
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
clear;
clf;
clc;
% Read EEG file data
% ask user
cd 'F:\'
display('Select edf data file to analyze');
[filename, filepath] = uigetfile('*.edf', 'Select edf file');
if filename == 0 return; end;
fname = [filepath filename];
[hdr, record]=edfRead(fname);
Line 27
%if length(hdr.label)< 50
Line 28
if length(hdr.label)< 30
data.Fp1 = record(1,:);
data.Fp2 = record(2,:);
data.F3 = record(3,:);
data.F4 = record(4,:);
data.C3 = record(5,:);
data.C4 = record(6,:);
data.P3 = record(7,:);
data.P4 = record(8,:);
data.O1 = record(9,:);
data.O2 = record(10,:);
data.F7 = record(11,:);
data.F8 = record(12,:);
data.T3 = record(13,:);
data.T4 = record(14,:);
data.T5 = record(15,:);
data.T6 = record(16,:);
data.A1 = record(17,:);
data.A2 = record(18,:);
data.Fz = record(19,:);
data.Cz = record(20,:);
data.Pz = record(21,:);
data.SubL = record(22,:);
data.SubR = record(23,:);
data.ECG = record(24,:);
else
data.Fp1 = record(1,:);
data.Fp2 = record(2,:);
data.F4 = record(3,:);
data.C3 = record(4,:);
data.C4 = record(5,:);
data.P3 = record(6,:);
data.P4 = record(7,:);
data.O1 = record(8,:);
data.O2 = record(9,:);
data.F7 = record(10,:);
data.F8 = record(11,:);
data.FC3 = record(12,:);
data.FT7 = record(13,:);
data.FT8 = record(14,:);
data.T7 = record(15,:);
data.T8 = record(16,:);
data.A1 = record(17,:);
data.A2 = record(18,:);
data.FCz = record(19,:);
data.TP7 = record(20,:);
data.CPz = record(21,:);
data.CP3 = record(22,:);
data.P7 = record(23,:);
data.TP8 = record(24,:);
data.P8 = record(25,:);
data.CP4 = record(26,:);
data.Oz = record(27,:);
data.HEOL = record(28,:);
data.HEOR = record(29,:);
data.FPz = record(30,:);
data.AF3 = record(31,:);
data.AF7 = record(32,:);
data.F5 = record(33,:);
data.AF8 = record(34,:);
data.AF4 = record(35,:);
data.F1 = record(36,:)
>>Line 91 is here<<
data.FC5 = record(37,:);
data.F6 = record(38,:);
data.F2 = record(39,:);
data.FC1 = record(40,:);
data.C5 = record(41,:);
data.FC6 = record(42,:);
data.FC2 = record(43,:);
data.C2 = record(44,:);
data.C1 = record(45,:);
data.CP1 = record(46,:);
data.CP5 = record(47,:);
data.P5 = record(48,:);
data.PO7 = record(49,:);
data.PO8 = record(50,:);
data.C6 = record(51,:);
data.CP6 = record(52,:);
data.PO6 = record(53,:);
data.P6 = record(54,:);
data.CP2 = record(55,:);
data.PO4 = record(56,:);
data.P2 = record(57,:);
data.PO2 = record(58,:);
data.P1 = record(59,:);
data.PO3 = record(60,:);
data.PO5 = record(61,:);
data.Fz=record(39,:); %duplicated because cap shows 'Fz' but header
% shows 'F2'. rest of program uses 'Fz'
% instead of T3,T4 use T7,T8
end;
If I use Line 28 I get this error:
Select edf data file to analyze
Index exceeds matrix dimensions.
Error in SpectralRatioST (line 91)
data.FC5 = record(37,:);
Length(hdr.label) is 36. I think if I can extend that somehow the “Else” portion will work.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu EEG/MEG/ECoG finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!