- Kindly define the optimization variable ‘Q’
- Second step is to set up the constraints, since each row of “Q” is “g*P_i” and “P_i” is an “NxN” diagonal matrix, you can express “P_i” as a vector (since it's diagonal) and then multiply by g to get the row of “Q”. The Frobenius norm constraint on “P_i” is equivalent to constraining the 2-norm of the vector since “P_i” is diagonal.
- Then we need to define the objective function, Since you have not specified the objective function, I am considering a placeholder function(“myObjectiveFunction”).
- So we have our problem set up now, we will need to loop over different values of “T” to solve for each scenario.
- https://in.mathworks.com/help/optim/ug/optimvar.html%22
- https://in.mathworks.com/help/optim/ug/optimproblem.html%22
- https://in.mathworks.com/help/optim/examples.html?category=problem-based-basics&s_tid=CRUX_topnav%22