Skip to content

Commit

Permalink
tsGetPOTAndRLargest: debug the case of 1 input percentiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenzo Mentaschi authored and Lorenzo Mentaschi committed Jun 16, 2016
1 parent 1288864 commit 3e7a704
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tsGetPOTAndRlargest.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
if length(pcts) == 1
% testing at least 2 percentages, to be able to compute the error on
% the percentage.
pcts = [pcts(1), pcts(1) - 3];
pcts = [pcts(1) - 3, pcts(1)];
end

numperyear=nan(length(pcts),1);
Expand All @@ -51,7 +51,7 @@
nperYear=tsGetNumberPerYear(ms,locs);
minnumperyear(ipp)=nanmin(nperYear);

if length(pks)/nyears<desiredEventsPerYear & nanmin(nperYear)<desiredEventsPerYear
if (ipp > 1) && (length(pks)/nyears<desiredEventsPerYear) && (nanmin(nperYear)<desiredEventsPerYear)

break

Expand Down

0 comments on commit 3e7a704

Please sign in to comment.