How to find optimum value to minimize error?
1 view (last 30 days)
Show older comments
for e.g. How to find optimum value of m & c? given, Ye=mx+c; x=[0 1 2 3 4]; Ye=[3 5 7 9 11]; to minimize error
0 Comments
Answers (1)
Torsten
on 13 Oct 2015
A=[0 1;1 1;2 1;3 1;4 1];
b=[3; 5; 7; 9 ; 11];
x=A\b;
m=x(1);
c=x(2);
Best wishes
Torsten.
0 Comments
See Also
Categories
Find more on NaNs in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!