How to find optimum value to minimize error?

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)

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.

Asked:

on 13 Oct 2015

Answered:

on 13 Oct 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!