weighted least squares solution

조회 수: 4 (최근 30일)
Sampath Bandara
Sampath Bandara 2021년 9월 24일
답변: Sivani Pentapati 2021년 11월 29일
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.

답변 (1개)

Sivani Pentapati
Sivani Pentapati 2021년 11월 29일
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.

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by