x=(1:10)' y=roundn(2*x+7*rand(size(x)),-1)
a*x=y
Estimate a using inverse matrix calculation. This is principle of linear regression.
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers89
Suggested Problems
-
Find the longest sequence of 1's in a binary sequence.
6817 Solvers
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15810 Solvers
-
Sum all integers from 1 to 2^n
17915 Solvers
-
Calculate distance travelled when given radius and rotations
242 Solvers
-
Union of two set decreasing order
131 Solvers
More from this Author27
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
As a friendly reminder, we can see the test suite, so it makes the problem more challenging if the solution is not explicitly in the test suite.
The Test Suite needs to allow for floating-point errors in all test cases, as demonstrated in Solution 1575603. (Refer to Problem 44690.) Also, there should be at least four test cases for every problem.