Cody

Solution 1881997

Submitted on 23 Jul 2019 by Xuan Yee
  • Size: 7
  • 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 = [2.7 3.3 2.0 3.3 1.7 3.7]; vds_correct = 0.8046; assert(isequal(vogel_dobbener_normalized(x), vds_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In vogel_dobbener_normalized (line 2) In ScoringEngineTestPoint1 (line 3) In solutionTest (line 3)]

2   Pass
x = [linspace(0, 0, 5) linspace(1, 1, 20) linspace(2, 2, 43) linspace(3, 3, 13)]; vds_correct = 0.6205; assert(isequal(vogel_dobbener_normalized(x), vds_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In vogel_dobbener_normalized (line 2) In ScoringEngineTestPoint2 (line 3) In solutionTest (line 5)]

3   Pass
x = [linspace(10, 10, 4) linspace(11, 11, 17) linspace(99, 99, 38) linspace(7777, 7777, 22)]; vds_correct = 0.6511; assert(isequal(vogel_dobbener_normalized(x), vds_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In vogel_dobbener_normalized (line 2) In ScoringEngineTestPoint3 (line 3) In solutionTest (line 7)]

4   Pass
x = [-pi -pi -pi i i i]; vds_correct = 1; assert(isequal(vogel_dobbener_normalized(x), vds_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In vogel_dobbener_normalized (line 2) In ScoringEngineTestPoint4 (line 3) In solutionTest (line 9)]

5   Pass
x = [7777 7777 7777 7777 7777 7777]; vds_correct = 0; assert(isequal(vogel_dobbener_normalized(x), vds_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In vogel_dobbener_normalized (line 2) In ScoringEngineTestPoint5 (line 3) In solutionTest (line 11)]