How can i define the vector to variable scalar?

I have A,B,C,D,E values all in size 1x1155. A=[1.0001, 1.0005, 1.00010,...,1.0009]. similar to B, C, D and E. I need (A(1)+B(1))/(C(1)+D(1)E(1)) + (A(2)+B(2))/(C(2)+D(2)E(2)) + ... + (A(1155)+B(1155))/(C(1155)+D(1155)E(1155)). Therefore i need each individual variable using loop rather than defining one by one from 1 to 1155. Is there a way to do that in Matlab?

• Look the example of this: mathworks.com/help/optim/ug/optimproblem.html The objective of the example is x(1) + x(2). It is easy to type manually. But I have 1155 variable [meaning x(1)+x(2)+...+x(1155)] to optimise and it will take ages to type manually. Thus I must use loop. My main part is to solve optivar('x',1,1155,'LowerBound',0,'UpperBound',0) - 1155 variables. How to use the loop in here? – Poohish... Nov 8 at 10:51

% given A,B,C,D,E