Cody

Solution 367872

Submitted on 10 Dec 2013 by James
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 = rand(1,38); y_correct = 1; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.4947 sx = 0.2709 ul = 1.3073 ll = -0.3178 ans = 1

2   Pass
%% x = rand(1,50); x(end) = 5; y_correct = 0; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.6790 sx = 0.6811 ul = 2.7223 ll = -1.3643 ans = 0

3   Pass
%% x = rand(1,50); y_correct = 1; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.4550 sx = 0.2996 ul = 1.3537 ll = -0.4437 ans = 1

4   Pass
%% x = rand(1,78); x(5) = 12; y_correct = 0; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.7279 sx = 1.3238 ul = 4.6993 ll = -3.2435 ans = 0

5   Pass
%% x = rand(1,38); y_correct = 1; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.5074 sx = 0.2894 ul = 1.3756 ll = -0.3609 ans = 1

6   Pass
%% x = rand(1,41); y_correct = 1; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.4887 sx = 0.2973 ul = 1.3805 ll = -0.4031 ans = 1

7   Pass
%% x = rand(1,36); x(end-8) = 9; y_correct = 0; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.7479 sx = 1.4467 ul = 5.0881 ll = -3.5923 ans = 0

8   Pass
%% x = rand(1,50); x(end) = 5; y_correct = 0; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.5641 sx = 0.6937 ul = 2.6452 ll = -1.5170 ans = 0

9   Pass
%% x = rand(1,50); x(end) = -7; y_correct = 0; assert(isequal(homemade_control_charts(x),y_correct))

m = 0.3350 sx = 1.0957 ul = 3.6221 ll = -2.9521 ans = 0

10   Pass
%% x = rand(1,50)+9; x(end) = -70; y_correct = 0; assert(isequal(homemade_control_charts(x),y_correct))

m = 7.9221 sx = 11.2482 ul = 41.6666 ll = -25.8224 ans = 0