MATLAB Programming Contest Blog

November 17th, 2010

Sergey again

Our friend Sergey has another feather for his cap by claiming the 100 Node Challenge prize. His winning entry came in last night with minutes to spare. In fact, his entry would have claimed the 98 Node Challenge too, since his thrifty code didn’t even use all 100 nodes.

Because it’s so short, it’s easy enough to show you the complete winning entry. Well done Sergey!

function [thrustRow, thrustCol] = amit_brad(chart, aIndex, bIndex, maxThrottle)
[aby abx]=ind2sub(size(chart),[aIndex; bIndex]);
d = (diff([aby abx]).*[1.004 0.9996])';
R=norm(d,1);
R=max(R,48);
t = round(maxThrottle.*d/(30/R+R) * [1 1 -ones(1,4) zeros(1,3)]);
thrustRow = t(1,:);
thrustCol = t(2,:);

And now we are into the final minutes of the contest. Good luck everyone!

One Response to “Sergey again”

  1. Sergey replied on :

    Frankly speaking, I just got lucky. Victoria created better entry. Unfortunately she made small mistake in her submission, and that let me to win. I hope it will not discourage her from future participation in the competition.


MathWorks
The MATLAB Programming Contest is a semi-annual competition where contestants submit MATLAB code to try to solve a challenge.

See behind the scenes of the MATLAB Programming Contest

These postings are the author's and don't necessarily represent the opinions of MathWorks.