lsqnonneg function without constraints

1 visualización (últimos 30 días)
rihab
rihab el 12 de Nov. de 2015
Respondida: John D'Errico el 12 de Nov. de 2015
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?

Respuesta aceptada

John D'Errico
John D'Errico el 12 de Nov. de 2015
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;

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by