Is there a way to predefine constraint size? #1433
Unanswered
tsofrank
asked this question in
General discussion
Replies: 1 comment
-
No, SDPs are not vectorizable (and YALMIP is storing stuff in split up lists in various ways to try to avoid some overhead when adding a single constraint to a list of constraints) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi community,
I am using yalmip in in MATLAB to solve an optimization problem with semi-definite constraints.
I currently define constraints in a for loop by
But my for loop are tens of thousands. Instead of changing the size of constr every time, is there a way I can predefine a list of a certain size and then assign constr(i) in a for loop?
I know MATLAB r2024 has a function createArray, but it requires a "classname" as one of the arguments. If I try
or
I get an error messages
Does anyone have suggestions on how I might be able to predefine a fixed size of constraints?
Many thanks,
Frank
Beta Was this translation helpful? Give feedback.
All reactions