Execution of script quadprog as a function is not supported

hi. I've tried to run simple quadprog script from optimization toolbox example
clc
clear all
H = [1 -1; -1 2];
f = [-2; -6];
Aeq = [1 1];
beq = 0;
[x,fval,exitflag,output,lambda] = ...
quadprog(H,f,[],[],Aeq,beq);
but I got some error in the result.
Execution of script quadprog as a
function is not supported:
D:\OneDrive - Institut Teknologi Sepuluh
Nopember\Kuliah Teknik Elektro\Semester
2\Metode statistik dan optimasi_Tele\pak
ronny\quadprog.m
Error in quadprog (line 10)
quadprog(H,f,[],[],Aeq,beq);
I have installed the optimization toolbox. what is the cause of failing to run the script? how to solve it

类别

在 帮助中心 和 File Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息

产品

版本

R2021a

回答:

2021-6-30

Community Treasure Hunt

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

Start Hunting!

Translated by