Given a set of data as x and y, find the RMS value between the data and its best fit curve from a first degree polynomial
x = [1:10]
y = [2 7 3 5 9 11 1 6 2 0]
bestfit_RMS = 3.3379
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
The Hitchhiker's Guide to MATLAB
Replace May with April
sum of non-primes
poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
Given an input string, generate a variable name out of it
Sum of diagonals elements of a matrix
Create a v-notch vector without "sort" function
Find offset of an element of a multi dimensional matrix
User defined nextpow function
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