Cody

Solution 1012450

Submitted on 12 Oct 2016 by Jean-Marie Sainthillier
  • Size: 11
  • 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.

This solution is outdated. To rescore this solution, sign in.

Test Suite

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

ans = 1 1 1

2   Pass
x = [2 1 9]; y_correct = [2/3 1/2 9 1] ; assert(isequal(your_fcn_name(x),y_correct))

ans = 0.6667 0.5000 9.0000 1.0000

3   Pass
x = [3 1 0]; y_correct = [1 1/2 0 1] ; assert(isequal(your_fcn_name(x),y_correct))

ans = 1.0000 0.5000 0 1.0000