1

We measure a projected signal $y\in\mathbb R$ with an analogue antenna at three different angles $x=0,\ y=1$; $x=\pi/4,\ y=0$; $x=\pi/2,\ y=1$; find $a$ and $b$ such that the function $$p(x) = a \cos(x) + b \sin(x)$$ best approximates the data points $(x, y)$, using the method of least squares.

I don't understand how to go about this question. i tried the matrix transformation a bunch of different ways but just kept getting stuck.

Ottavio
  • 2,367
RP Only
  • 11

1 Answers1

1

You have $n$ data points $(x_i,y_i)$ and you want to model $$y_i = a \cos(x_i) + b \sin(x_i)$$ If this could help you, define $u_i=\cos(x_i)$ and $v_i \sin(x_i)$ to make the model to be $$y_i=a u_i +b v_i$$ that is to say a bilinear regression with no intercept.

Now, set the matrix.