我有带有字段的 1x1008 结构数组 EEG.event
latency
duration
channel
bvtime
bvmknum
type
code
urevent
我想删除字段 EEG.event.type = 'boundary' 或 'R 1' 中的条目的所有行
我尝试了以下循环:
for b = 1:length(EEG.event)
if strcmp(EEG.event(b).type, 'boundary')
EEG.event(b) = [];
elseif strcmp(EEG.event(b).type, 'R 1')
EEG.event(b) = [];
end
end
这当然行不通,因为计数变量b
在某些时候超过了EEG.event
.
有谁知道如何删除特定行?