Cody

Problem 837. Find all the zeros of sinus , cosinus and tangent in a given interval

Solution 587113

Submitted on 23 Feb 2015
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Fail
%% Test sinus between [0 2pi] assert(all(abs(find_zeros(@sin,0,2*pi) -[0 pi 2*pi])<1e-9)) %[0 pi] assert(all(abs(find_zeros(@sin,0,pi) -[0 pi ])<1e-9)) % [0 pi/3] assert(all(abs(find_zeros(@sin,0,pi/3) -0) <1e-9))

Error: Output argument "out" (and maybe others) not assigned during call to "/users/msssystem17/find_zeros.m>find_zeros".

2   Fail
%% Test cos between [0 2pi] assert(all(abs(find_zeros(@cos,0,2*pi) -[-pi/2 pi/2 3*pi/2])<1e-9))

Error: Output argument "out" (and maybe others) not assigned during call to "/users/msssystem17/find_zeros.m>find_zeros".

3   Fail
%% Test tan between [0 pi/4] assert(all(abs(find_zeros(@tan,0,pi/4) -0)<1e-9))

Error: Output argument "out" (and maybe others) not assigned during call to "/users/msssystem17/find_zeros.m>find_zeros".

Suggested Problems

More from this Author30

Community Treasure Hunt

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

Start Hunting!