Input for ARfit ? (EEG analysis)
57 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I am trying to use the ARfit toolbox on EEG data, more specifically the arfit function itself, but I can't figure out what format the input should be in.
It says on the toolbox page that "The input matrix v must contain the time series data, with columns of v representing variables and rows of v representing observations" but I don't understand what it means. What I have is a vector where the rows are the EEG channels, and the columns are the signal values for each data point. However, it clearly doesn't work (either returns an error "time series too short", or it runs but the output is wrong (siglev = 0 with the function arres)).
I'm hoping someone there know how to use the toolbox better than I do... Thanks in advance.
0 Kommentare
Antworten (2)
William Rose
am 5 Nov. 2024 um 16:06
Bearbeitet: William Rose
am 5 Nov. 2024 um 16:08
[Edit: fix spelling.]
Have you run the script ardem.m, which is part of the ARfit toolbox? Does it produce reasonable output?
Assuming it does, I would modify ardem, so that it uses two columns of your data, instead of using the simulated data that it does use. To do this, change line
v = arsim(w, A, C, 200); % generate simulated data v (200x2 array)
to something like
myData=load('myData.txt'); % read data from file
v=myData(1:200,1:2); % v=rows 1-200 & columns 1 and 2 of data
The details of the new lines above will vary depending on which columns you want to use, etc. But you get the idea. See what happens.
You can also start a discussion on the FileExchange site for that toolbox.
Attach a sample data file here, if you want more assistance.
2 Kommentare
Walter Roberson
am 5 Nov. 2024 um 19:40
What I have is a vector where the rows are the EEG channels, and the columns are the signal values for each data point.
Your input is in the wrong form for the toolbox.
Each EEG channel should be considered independent. Going to the next row of the data does not correspond to going to the next time-point of the data.
Potentially if you were to flip the array it just might be the right order... provided that what is currently the colums that are signal values for each data point, happen to reflect different times.
You need
channel1_time1 channel2_time1 channel3_time1
channel1_time2 channel2_time2 channel3_time2
channel1_time3 channel2_time3 channel3_time3
channel1_time4 channel2_time4 channel3_time4
and so on.
7 Kommentare
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!