### Generate a sum vector

Posted:

**Wed Apr 11, 2018 2:12 pm**Hello, I have run this:

for %c {%grp}

for !j = 1 to var_{%c}.@neqn

vector(!j) ssr_{%c}(!j) = var_{%c}.@ssr(!j)

vector sum_ssr_{%c}(1)=@sum(ssr_{%c})

next

next

where %grp = h dev fixed flex open closed hdebt ldebt

Is there a way to generate a vector like this: ssrt_debt(1)= sum_ssr_ldebt+sum_ssr_hdebt, to sum only the sum_ssr vector for hdebt and for ldebt? I have run this but it doesn't work.

Thank you!

for %c {%grp}

for !j = 1 to var_{%c}.@neqn

vector(!j) ssr_{%c}(!j) = var_{%c}.@ssr(!j)

vector sum_ssr_{%c}(1)=@sum(ssr_{%c})

next

next

where %grp = h dev fixed flex open closed hdebt ldebt

Is there a way to generate a vector like this: ssrt_debt(1)= sum_ssr_ldebt+sum_ssr_hdebt, to sum only the sum_ssr vector for hdebt and for ldebt? I have run this but it doesn't work.

Thank you!