# Exponential cone efficient formulation in cvx

Hi,

I am using CVX in Matlab.

I have several exponential cone constraints, which I currently I add in my problem one-by-one in a for loop. This seems to be very time consuming. When I try to add them in a more compact form, I don’t get the right answer (most likely the constraint I am adding is not written correctly - see below)

For example, assume I have N constraints, in a for loop I add them as follows
for i = 1:1:N
{x(i),y(i),z(i)} == exponential(1)
end
where x,y,z are variables of dimension N.

If I try adding them as follows
{x,y,z} == exponential(1)
this doesn’t seem to work.

On a separate issue, is there a way to formulate a CVX problem parametrically, i.e., if I want to solve the problem over-and-over by changing 1 parameter in the optimization problem, is it necessary to rewrite the problem (which seems to be very time consuming)?

kind regards,
Angelos

Try
`{x,y,z} == exponential(N)`
I think, but am not guaranteeing this will work correctly.

As for the 2nd question, unfortunately, there is no way to do that in CVX.

Thanks a lot Mark

It does the trick for now. I hope it stays like that!

best wishes,
Angelos