Nice problem Swapnali! Since it has a floating-point answer, you should specify how many significant digits you're looking for, or include a tolerance term in your test suite.
Thanks Ned. Can you please show me how can I add a torelance term for the answer in test suite?
something like this:
please allow for tolerance in precision of test case answers
Rounding gives me serious trouble on this test. I have tried a variety of methods that all "appear" to return the correct answer, however the assertion fails.
can anyone tell me why this isnt working? i rounded to pass one test#.I understand this is a problem. But what else am i missing? precision problem? thanks
Prime factor digits
Back to basics 7 - Equal NaNs
Generate N equally spaced intervals between -L and L
Make a 1 hot vector
Find supported functions
Let's get back to school: create mixed numbered fraction
Matrix multiplication across rows
Return the names and values of the input arguments of a function
Back to basics - mean of corner elements of a matrix
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office