lsqnonneg function without constraints

4 ビュー (過去 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 Center および File ExchangeLinear Least Squares についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by