weighted least squares solution

4 visualizaciones (últimos 30 días)
Sampath Bandara
Sampath Bandara el 24 de Sept. de 2021
Respondida: Sivani Pentapati el 29 de Nov. de 2021
Hi, all
How to compute weighted least squares solution with weight in matrix form. i.e., each column of the weight matrix has a different weight. I tried using "lscov(A,B,w)" with "for loop," but is there any optimized way to do that.
Thanks for your time and consideration.

Respuestas (1)

Sivani Pentapati
Sivani Pentapati el 29 de Nov. de 2021
Hi Sampath,
You can try vectorizing your code or use other toolboxes to implement weights for your fits. This can be done using Statistics Toolbox, Cure fitting Toolbox, Optimization toolbox. Please refer to this answer for more information.

Categorías

Más información sobre Get Started with Optimization Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by