Input for ARfit ? (EEG analysis)
조회 수: 57 (최근 30일)
이전 댓글 표시
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
답변 (2개)
William Rose
2024년 11월 5일 16:06
편집: William Rose
2024년 11월 5일 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
Walter Roberson
2024년 11월 5일 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
참고 항목
카테고리
Help Center 및 File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!