matlab LSQ error calculation computation time
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everybody,
I am trying to calculate a simple least squares solution and its corresponding error with the function below. When calculating the error the script slows down significantly. In fact a run with an active profiler shows that 99% of computation time is spent in the line
err=psi'*(I-H*t)*psi.
Can anybody explain why this line is so expensive or give an solution that is faster?
%H: observation matrix,
%I: identiy matrix,
%psi: measurement vector,
%PCO: parameter estimate,
%err: error of the estimate
function [PCO,err]=calcPC_LSQ(H,I,psi)
t=(H'*H)\H';
PCO=t*psi;
err=psi'*(I-H*t)*psi;
end
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!