Problem 44848. Approximate the inverse tangent by power series
Given values b (where abs(b)<=1) and n (polynomial order), write a function that calculates atan(b) by using power series.
Solution Stats
Problem Comments
-
6 Comments
Please fix the test suite.
The arguments need to be supplied to the function, as in:
assert(isequal(your_fcn_name(b, n),y_correct))
Test suite has been fixed. Thanks for the comments!!
There is still a problem with the test suite. The quantity ff is not defined in test suite problems 2 and 3.
The test suite has been fixed and improved.
Also, note that the input n (polynomial order) refers to the highest-powered term in the series, NOT the number of series terms.
Solution Comments
Show commentsProblem Recent Solvers13
Suggested Problems
-
Back to basics 25 - Valid variable names
324 Solvers
-
Find the largest value in the 3D matrix
1521 Solvers
-
Check if number exists in vector
11677 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1072 Solvers
-
148 Solvers
More from this Author11
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!