Cody

Problem 44676. Mean = Standard Deviation

Solution 2901776

Submitted on 2 Sep 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

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!