<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi all, 
<div class=""><br class="">
</div>
<div class="">I’d like to remove rows in EEG.event that I don’t need. </div>
<div class=""><br class="">
</div>
<div class="">Is there a straight forward way to delete rows in a struct array with fields, depending on a particular field entry?</div>
<div class="">I tried the following: </div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Courier;" class="">
<div style="margin: 0px; line-height: normal;" class=""><span style="color: #0433ff" class="">for</span> b = 1:length(EEG.event)  </div>
<p style="margin: 0px; line-height: normal; min-height: 13px;" class="">    <br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; line-height: normal;" class="">         <span style="color: #0433ff" class="">
if</span> strcmp(EEG.event(b).type, <span style="color: #b245f3" class="">'boundary'</span>)</div>
<div style="margin: 0px; line-height: normal;" class="">            EEG.event(b) = [];</div>
<div style="margin: 0px; line-height: normal;" class="">         <span style="color: #0433ff" class="">
elseif</span> strcmp(EEG.event(b).type, <span style="color: #b245f3" class="">'R  1'</span>)</div>
<div style="margin: 0px; line-height: normal;" class="">            EEG.event(b) = [];</div>
<div style="margin: 0px; line-height: normal;" class="">         <span style="color: #0433ff" class="">
end</span></div>
<p style="margin: 0px; line-height: normal; min-height: 13px;" class="">         <br class="webkit-block-placeholder">
</p>
<div style="margin: 0px; line-height: normal; color: rgb(4, 51, 255);" class="">end</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
<div class="">Putting a for loop around it doesn’t help much as b exceeds the new EEG.event length at some point...</div>
<div class=""><br class="">
</div>
<div class=""></div>
<div class="">Hope someone can help. Thanks a lot in advance. </div>
<div class=""><br class="">
</div>
<div class="">Best, </div>
<div class="">Clemens </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
__________________________________</div>
<div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
Clemens Dickhut, M.Sc., (PhD Student) <br class="">
Institute for Health and Behaviour<br class="">
Research Unit INSIDE<br class="">
University of Luxembourg - Campus Belval<br class="">
Maison des Sciences Humaines<br class="">
11, Porte des Sciences, R. 04 415<br class="">
L-4366 Esch-sur-Alzette</div>
<div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
Tel.: (+352) 46 66 44 9536<br class="">
</div>
<div class="" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<br class="">
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>