I am currently trying to use weighted least squares via lscov, to minimize using the design matix,
A = [-0.7867 0.0464 -0.6155 1.0000; -0.3751 0.4299 -0.8213 1.0000; 0.0447 0.4895 -0.8708 1.0000; -0.5946 0.8029 0.0424 1.0000]
and the error vector
b = [26.3019 0 4.4677 4.6455]'
However, using lscov, the results are the same.
x1 = lscov(A,(b),[.001 1 1 1]) x2 = lscov(A,(b),[1 1 1 1]) x1 = x2 = [26.2071 -73.2683 43.6825 77.2045]'
I have realized that this is because A is a square matrix. Is there a way to minimize with a weighting on a residual vector in the case of square matrices.
I have considered multiplying the error vector by a weight but I am not sure that is a reasonable approach.
Best Answer