필터 지우기
필터 지우기

How do you constrain values in x using lsqlin ?

조회 수: 1 (최근 30일)
psprinks
psprinks 2018년 1월 30일
댓글: psprinks 2018년 1월 30일
I'd like to add constraints to the first 7 values of my x vector from the solution of Ax=b using lsqlin. Specifically, that those first 7 values sum to zero. It's not clear to me how to do that using the Aeq/beq, or lb/ub inputs the tool accepts. Can anyone advise?

채택된 답변

Matt J
Matt J 2018년 1월 30일
Aeq=zeros(size(x));
Aeq(1:7)=1;
beq=0;

추가 답변 (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