0
$\begingroup$

This is what i am given:
$y=[3, 5, 5, 8, 10, 12, 15, 16, 18, 19]$ and $t=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]$ experimental data

Solve x=A\b Thanks got it

1 Answers 1

1

Here set you up with the code:

y=[3, 5, 5, 8, 10, 12, 15, 16, 18, 19] t=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

A = [t',ones(10,1)]; b = y';

x=A\b

plot(t,y,'o',[1, 10], [x(1)*1+x(2), x(1)*10+x(2)],'-')

  • 0
    What is the total squared error here?2012-11-25