How to find optimum value to minimize error?
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
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.
Categories
Find more on Profile and Improve Performance 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!