lsqnonneg function without constraints

조회 수: 1 (최근 30일)
rihab
rihab 2015년 11월 12일
답변: John D'Errico 2015년 11월 12일
lsqnonneg function of MATLAB helps to find value of x that minimizes norm of|C*x - d| subject to x >= 0. However, I want to find value of x that minimizes norm of|C*x - d| without any constraints. Is there some function in MATLAB to do so?

채택된 답변

John D'Errico
John D'Errico 2015년 11월 12일
Um, zillions of them?
lsqcov, regress, fit, lsqlin, lsqr, and that ignores all the nonlinear iterative solvers.
Turns out the most trivial, is just
x = C\d;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by