Imposing additional constraints while using 'lsqnonneg'
Mostrar comentarios más antiguos
Hi everyone,
I would like to impose additional constraints while using 'lsqnonneg'. Besides the non-negativity of the solution, I want to constrain the solution to be zero at the end points. I appreciate your effort towards the community.
thanks sathish.
Respuestas (1)
Teja Muppirala
el 10 de Jul. de 2012
I think this should work.
If you are minimizing |Cx - d|
First, remove the first and last columns of C, and call LSQNONNEG on that:
X = lsqnonneg(C(:,[2:end-1]),d)
Then add a zero to the beginning and end:
X = [0; X ; 0]
1 comentario
Sathish Akella
el 10 de Jul. de 2012
Categorías
Más información sobre Linear Least Squares en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!