Hi there,
When I add more and more constraints to the constraint vector, using format:
Constraint = [Constraint, a >= b];
it becomes time consuming, probably due to matrix resizing. So I want to pre-allocate memory for a large constraint vector (e.g., 10,000). How can I do that?
What I have tried so far is:
1. try to populate the last entry of the vector:
Constraint(1,10000) = [a >= b];
2. try to create a double vector and convert element to constraint:
Constraint = zeros(1,10000); Constraint(1,1) = [a >= b];
3. try to find some type identifier other than double:
Constraint = constraint(1,10000);
Apparently, none works. Can somebody help me please? Thanks a lot.
Xu