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

Learn moreOpportunities for recent engineering grads.

Apply TodayVery easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, prod, cumprod , dec2bin, int2str and num2str functions. Will you take up the challenge?!

Example : x= 3; y= 2;

output = 6 since 3*2 = 6 :)

138 correct solutions
596 incorrect solutions

Last solution submitted on Jan 27, 2015

7 players like this problem

2 Comments

Dimitrios
on 8 Mar 2014

i cant understand why test 1 fails :/

Aurelien Queffurust
on 10 Mar 2014

It fails because you use the minus sign and there is the following test :
assert(isempty(strfind(filetext, '-')))

2 Comments

Kumar
on 29 May 2013

Test 1 is always showing Fail. This is disgusting. May be some error on the creator part. Kindly check...

Ned Gulley
on 29 May 2013

The error for Test 1 says "Output argument 'output' (and maybe others) not assigned". Close examination of your code reveals that when x is 1 and y is 2, you go down the first switch of the outer "if" statement, and sure enough, output never gets assigned and the function fails.

3 players like this solution

1 Comment

David Young
on 4 Jul 2012

Only works for scalars of course.

2 Comments