How can I model my objective function for optimization?
古いコメントを表示
I have an objective function in microsoft excel, which is expressed as: SQRT(MMULT(MMULT(TRANSPOSE((AI25:AI54)*E5:E34),G5:AJ34),(AI25:AI54)*E5:E34)),
- AI25:AI54 - is a 29x1 matrix of unknowns
- E5:E34 - is a 29x1 matrix of constants
- G5:AJ34 - is 29x29 covariance matrix of constants
I am not sure how to write this function in MATLAB terminology, but I can explain mathematically of what is happening:
- Step 1: ((AI25:AI54)*E5:E34) , here suppose the first matrix is [1,2,3] and second matrix is [3,2,1], then the resultant matrix will be [1x3,2x2,3x1], which is [3,4,3] . I think * operation is similar to .* operation of MATLAB with matrices. Resultant is a 29x1 matrix.
- Step 2: A transpose of resultant of step 1 is taken, which results in 1x29 matrix.
- Step 3: Resultant of step 2 is matrix multiplied(normal matrix multiplication) with G5:AJ34, which results into a 1x29 matrix. You can observe all the elements are linear.
- Step 4: Resultant of step 3 is matrix multiplied with the resultant of step 1, which results into a 1x1 matrix. You can observe the element in the matrix is in quadratic form
- Step 5: Square root of the resultant of step 4, which results into my objective function
I want to model the resultant of step 5 in MATLAB with something like quadprog as my objective function, which is to be minimized. I choose quadprog, as my objective function is quadratic and all my constraints are linear in nature.
Can someone please help me with putting this objective function in the form of quadprog objective function?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Quadratic Programming and Cone Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!