Cody

Solution 1240043

Submitted on 27 Jul 2017 by Chris Cleveland
  • Size: 9
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = [45,45] y_correct = 0 assert(isequal(your_fcn_name(x),y_correct))

x = 45 45 y_correct = 0 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

2   Pass
x=[27,327] y_correct=1/2 assert(isequal(your_fcn_name(x),y_correct))

x = 27 327 y_correct = 0.5000 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

3   Pass
x=[546,273] y_correct=1/3 assert(isequal(your_fcn_name(x),y_correct))

x = 546 273 y_correct = 0.3333 [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

Suggested Problems

More from this Author5