フィルターのクリア

Recode the first fixation after target using loop

2 ビュー (過去 30 日間)
Xin Huang
Xin Huang 2020 年 12 月 16 日
編集済み: Xin Huang 2020 年 12 月 16 日
I am a freshman to Matlab and recently need to use it to do some data analysis. I have an eeg.event strcuture with one of fileds called 'type', I need to recode the first fixation (L_fixation) after stimulus onset ('111'). See the screenshot below.
Here is my code:
ix_nonrep=find(ismember({EEG.event.type},'111'));
for i=1: length(ix_nonrep)
while ~ismember({EEG.event.type}, 'L_fixation')
ix_nonrep(i)= ix_nonrep(i)+1;
[ffix]=ix_nonrep(i,:)
end
end
But I can't make it work as I what I hoped. I want to the loop can return the index, so I can use the index to rename the events. Does anyone know how to make it work? Thank you in advance.

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by