What wrong with this linear simlp(f, A, b) problem?

This is my code for the above problem but the answer seems wrong? Can anyone tell me the problems?
f = [-0.4, -0.45];
A = [1, 1; -100 -150; -750, -700; -1 0; 0 -1];
b = [7; -650; -4000; 0; 0];
simlp(f,A,b)
ans =
0.0000
7.0000

댓글 수: 1

simlp() appears to be an undocumented internal Simulink function, that has nothing to do with linear programming ?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2021년 6월 10일

0 개 추천

Linear programming is typically coded in terms of minimization. You want to minimize the costs. But you have expressed your costs as negative, so if simlp() is like most linear programming solvers, you are effectively asking to maximize the costs.

카테고리

도움말 센터File Exchange에서 Linearization에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2021년 6월 10일

댓글:

2021년 6월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by