Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today
724Rank
3Badges
530Score

Jon Agustsson submitted a Comment to Solution 133859

It is funny that this feval(@eval, '[~, ans] = max(x==y);') has smaller size than this [~, ans] = max(x==y);

on 6 Sep 2012

Jon Agustsson submitted a Comment to Solution 4286

Strange I can not delete my first comment. I wanted to format it a bit nicer :)

on 6 Jul 2012

Jon Agustsson submitted a Comment to Solution 4286

Nice indeed. I am surprised that it is more efficient to solve this with a recursive function than a while loop. This solution has size 43: while n(end) > 1 n = [n mod(n(end),2)*(n(end)*2.5+1) + n(end)/2]; end Is the loop overhead greater than the recursion overhead? Or is the weak point having to go to n(end) at each iteration?

on 6 Jul 2012

Jon Agustsson received Commenter badge for Solution 4286

on 6 Jul 2012

Jon Agustsson submitted Solution 104066 to Problem 167. Pizza!

on 28 Jun 2012