Cody

Problem 44676. Mean = Standard Deviation

Solution 2885402

Submitted on 28 Aug 2020 by Dennis Gimlin
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
for idx = 5:50 x = idx; Series = meanEqualsStd(x); mSeries = mean(Series); sSeries = std(Series,1); assert(length(Series)==x); assert(round(mSeries)==mSeries); assert(round(sSeries)==sSeries); assert(all(round(Series) == Series)); assert(all(round(Series) >= 1)); assert(mSeries == sSeries); end

ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 2 stdy = 2 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 4 stdy = 4 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 4 stdy = 4 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 7 stdy = 7 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 4 stdy = 4 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 14 stdy = 14 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 8 stdy = 8 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 17 stdy = 17 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 12 stdy = 12 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 9 stdy = 9 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 22 stdy = 22 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 19 stdy = 19 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 12 stdy = 12 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 20 stdy = 20 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 16 stdy = 16 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 21 stdy = 21 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 14 stdy = 14 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 17 stdy = 17 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 30 stdy = 30 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 19 stdy = 19 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 28 stdy = 28 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 21 stdy = 21 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 26 stdy = 26 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 31 stdy = 31 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 26 stdy = 26 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 35 stdy = 35 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 32 stdy = 32 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 24 stdy = 24 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 32 stdy = 32 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 30 stdy = 30 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 46 stdy = 46 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 33 stdy = 33 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 38 stdy = 38 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 33 stdy = 33 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 36 stdy = 36 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 42 stdy = 42 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 44 stdy = 44 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 31 stdy = 31 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 48 stdy = 48 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 33 stdy = 33 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 42 stdy = 42 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 53 stdy = 53 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 34 stdy = 34 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 52 stdy = 52 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 44 stdy = 44 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 57 stdy = 57

2   Pass
filetext = fileread('meanEqualsStd.m'); assert(isempty(strfind(filetext, 'echo'))) assert(isempty(strfind(filetext, 'assert')))

Suggested Problems

More from this Author67

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!