Cody

Problem 42819. attenuation

Solution 2996869

Submitted on 27 Sep 2020 by Rafael S.T. Vieira
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
d = 1; alpha = 0; p_correct = 100; assert(abs(attenuation(d,alpha)-p_correct)<0.01);

2   Pass
d = 1; alpha = 1; p_correct = 36.79; assert(abs(attenuation(d,alpha)-p_correct)<0.01);

3   Pass
d = [1,1,1]; alpha = [0.1,0.2,0.3]; p_correct = 54.88; assert(abs(attenuation(d,alpha)-p_correct)<0.01);

4   Pass
d = 1:10; alpha=0.01*(10:(-1):1); p_correct = 11.08; assert(abs(attenuation(d,alpha)-p_correct)<0.01);

Suggested Problems

More from this Author9

Community Treasure Hunt

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

Start Hunting!