线性规划工具箱使用。
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
银河注单异常延迟风控检测审核不通过无法提现怎么办?【微81923899】
le 22 Mai 2023
Réponse apportée : 开元遇到系统检测风控审核导致注单回传不给提现怎么办?【微81923899】
le 22 Mai 2023
clc, clear, c=[3, -1, -1];
a=[1, -2, 1; 4, -1, -2]; b=[11,-3]';
prob = optimproblem('ObjectiveSense','max');
x = optimvar('x',3,'LowerBound',0);
prob.Objective = c*x;
prob.Constraints.con1 = a*x<=b;
prob.Constraints.con2 = -2*x(1)+x(3)==1;
[sol, fval, flag, out] = solve(prob)
xx = sol.x %显示决策变量的值
未定义函数或变量 'optimproblem'。
书上的代码粘过来的,直接运行不了,百度过只知道是工具箱的问题,但是不知道如何解决
0 commentaires
Réponse acceptée
开元遇到系统检测风控审核导致注单回传不给提现怎么办?【微81923899】
le 22 Mai 2023
20版没问题,能得到结果
xx =
4.0000
1.0000
9.0000
你可能是没有安装对应的Optimization Toolbox优化工具箱导致缺失需要调用的函数。
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 线性最小二乘 dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!