Effacer les filtres
Effacer les filtres

Cannot multiply 2 variables with cvx package

6 vues (au cours des 30 derniers jours)
Archer Ao
Archer Ao le 28 Juil 2020
As I'm writing a test code for solving an applied problem with cvx, I got an error:
Disciplined convex programming error:
Invalid quadratic form(s): not a square.
Here's my code:
cvx_begin
variables p q s t P C R;
maximize(P);
subject to
P = R-C;
C = 400000+195*s+225*t
R = p(1)*s(1)+q(1)*t(1)
p = 339-0.01*s-0.003*t;
q = 399-0.004*s-0.01*t;
s >= 0;
t >= 0;
cvx_end
Could anyone help? I'm not used in cvx using

Réponses (0)

Catégories

En savoir plus sur Strategy & Logic dans Help Center et File Exchange

Tags

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by