I'm a beginner in Mathematica, and I got stuck in programming a weighted least squares problem.
I had the original fitting problem
A.x = b
where A has 300 rows but only 70 colums, therefore I got an overdetermined system. I found the best solution to be the least sqaures fitting, where I minimize e = A.x-b
Now I've got the idea to weigh the fitting, meaining I am now searching for the minimum of
e = Transpose[A.x-b].W.(A.x-b)
Where W is a matrix with 300 rows and 300 columns only containing values in the diagonal (different weights).
I've tried FindMinimum, but had no luck. Also I searched Wolfram but only found solution for single variable problems, whereas I have 70 of them.