Can you please explain me this for loop in this code,How this is running
Show older comments
idx = EV > 0;
if iscolumn(idx), idx = idx'; end;
idx2 = [0, idx, 0];
prePt = []; postPt = [];
for i = 2 : length(idx2)-1
if idx2(i-1) == 0 & idx2(i) == 1 & idx2(i+1) == 1
prePt = [prePt, i-1];
end
if idx2(i-1) == 1 & idx2(i) == 1 & idx2(i+1) == 0
postPt = [postPt,i-1];
end
end
2 Comments
According to your other question this code is not running, but generating an error. How do you expect us to explain what code does, if it only generates an error?
Animesh Shaw
on 13 Jan 2016
Accepted Answer
More Answers (1)
Animesh Shaw
on 13 Jan 2016
Edited: Stephen23
on 13 Jan 2016
Categories
Find more on App Building in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!