test suite is correct, but the problem statement is incorrect. Upper limit should be mean PLUS 3 stdev, and lower limit should be minus 3 stdev.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = rand(1,38);
y_correct = 1;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
1
|
2 | Pass |
%%
x = rand(1,50);
x(end) = 5;
y_correct = 0;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
0
|
3 | Pass |
%%
x = rand(1,50);
y_correct = 1;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
1
|
4 | Pass |
%%
x = rand(1,78);
x(5) = 12;
y_correct = 0;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
0
|
5 | Pass |
%%
x = rand(1,38);
y_correct = 1;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
1
|
6 | Pass |
%%
x = rand(1,41);
y_correct = 1;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
1
|
7 | Pass |
%%
x = rand(1,36);
x(end-8) = 9;
y_correct = 0;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
0
|
8 | Pass |
%%
x = rand(1,50);
x(end) = 5;
y_correct = 0;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
0
|
9 | Pass |
%%
x = rand(1,50);
x(end) = -7;
y_correct = 0;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
0
|
10 | Pass |
%%
x = rand(1,50)+9;
x(end) = -70;
y_correct = 0;
assert(isequal(homemade_control_charts(x),y_correct))
ans =
0
|
1137 Solvers
927 Solvers
146 Solvers
Simple equation: Annual salary
3407 Solvers
204 Solvers