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

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Develop a function that will divide a very very large integer numerator, supplied to function as a string (e.g., '12233344445555566666677777778888888899999999') by a reasonably sized integer or float, supplied as a number.

Return integer part of quotient as text (leading zeros acceptable), and remainder as a number.

Inspired by my initial misapprehension of failure of simple solution at one of the test cases of Doug Hull's http://www.mathworks.com/matlabcentral/cody/problems/234-project-euler-problem-3-largest-prime-factor, and dedicated to those willing to code 'the wrong way around' any problem.

I look forward to not understanding arcane code involving either/both bsxfun and arrayfun! I'm talking to you, @bmtran, Alfnie, et al!

30 correct solutions
16 incorrect solutions

Last solution submitted on Aug 28, 2015

1 player likes this solution

2 Comments

Christopher
on 11 Feb 2013

I wish I could award bonus points for going straight to the shell for the answers.

Vitaly Lavrukhin
on 18 Feb 2013

Thank you, Christopher! Sometimes Python comes in handy.

2 players like this solution

1 Comment

Christopher
on 8 Feb 2013

And there it is in a single function. Nice!

1 Comment