フィルターのクリア

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;
  1 件のコメント
psprinks
psprinks 2018 年 1 月 30 日
Awesome! Thank you Matt J

サインインしてコメントする。

その他の回答 (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