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

Solution 255322

Submitted on 5 Jun 2013

Incorrect

32Size
Leading solution size is 12.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Fail
 
%%
g=32; h=10000;
v_correct = 800;
assert(isequal(canon(g,h),v_correct))
Error: Output argument "v" (and maybe others) not assigned during call to "/users/msssystem13/canon.m>canon".
2
Pass
 
%%
g=32; h=100;
v_correct = 80;
assert(isequal(canon(g,h),v_correct))
v =
    80
3
Pass
 
%%
g=32; h=4;
v_correct = 16;
assert(isequal(canon(g,h),v_correct))
v =
    16