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
Example
x = [1:10] y = [2 7 3 5 9 11 1 6 2 0]
bestfit_RMS = 3.3379
Solution Stats
Problem Comments
4 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers23
Suggested Problems
-
Remove the polynomials that have positive real elements of their roots.
1740 Solvers
-
271 Solvers
-
125 Solvers
-
Find out total non zero element of matrix
285 Solvers
-
Find Out sum of principal diagonal element of given matrix
256 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
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:
assert(abs(BestFit(x,y)-y_correct)<1e-5)
please allow for tolerance in precision of test case answers