Cody

GEORGIOS BEKAS

175
Rank
4
Badges
4100
Score
101 – 150 of 455

GEORGIOS BEKAS submitted Solution 1440908 to Problem 2784. Y=X

on 14 Feb 2018

GEORGIOS BEKAS submitted a Comment to Problem 722. Make a run-length companion vector

y=[]; for i = 1:length(delta) test = max(delta(1:i)); maxsofar=max(delta(1:i-1)); test2=min(delta(1:i)); minsofar=min(delta(1:i-1)); if test == delta(i) && delta(i)~= maxsofar y=[y,1]; elseif test2 == delta(i) && delta(i)~= minsofar y=[y,-1]; else y=[y,0]; end end this code despite its giving correct results it is rejected by the tests...

on 14 Feb 2018

101 – 150 of 455