Markowitz matlabe code problem
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a problem with QUADPROG, who can help with this. Below is code, when i run code have same error (Error using quadprog (line 144) QUADPROG requires the following inputs to be of data type double: 'X0'.).
1 Kommentar
Antworten (1)
Walter Roberson
am 14 Sep. 2018
You have
quadprog(P1Cov,c,Aineq,-r(i),beq,lb,ub,x0,options)
the syntax with 9 parameters is
quadprog(H,f,A,b,Aeq,beq,LB,UB,X0)
Matching, we see that you are passing in:
- P1Cov for the H parameter
- c for the f parameter
- Aineq for the A parameter
- -r(i) for the b parameter
- beq for the Aeq parameter -- that does not look right
- lb for the beq parameter -- that does not look right
- ub for the LB parameter -- that does not look right
- x0 for the UB parameter -- that does not look right
- options for the X0 parameter -- that does not look right, and is triggering the error message
It looks to me as if you have failed to pass the Aeq parameter.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Quadratic Programming and Cone Programming finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!