contraining sums

Hi all,

I’m trying to write a code meaning X(t) = sum from t-p to t of the variable Y(t), which results in: X(t)= Y(t-p) + Y(t-p+1) + …+ Y(t) [p is a scalar data]

How can I constrain the sum this way? Thank you very much.

Guillem.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hello Guillem,

alias(t,tt);
X(t)=e=sum(tt
$(ord(tt)>=ord(t)-p and ord(tt)<=ord(t))
,Y(tt));
or a syntax equivalent.

Happy to help,
Henry Vermue

On Wednesday, February 20, 2013 2:04:49 PM UTC+1, Guillem Viñals Canal wrote:


Hi all,

I’m trying to write a code meaning X(t) = sum from t-p to t of the variable Y(t), which results in: X(t)= Y(t-p) + Y(t-p+1) + …+ Y(t) [p is a scalar data]

How can I constrain the sum this way? Thank you very much.

Guillem.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\

Hello Henry,

Perfect! Thanks for your help and your time.

Sincerely, Guillem.

El dimecres 20 de febrer de 2013 14:17:06 UTC+1, Henry JW Vermue va escriure:

Hello Guillem,

alias(t,tt);
X(t)=e=sum(tt
$(ord(tt)>=ord(t)-p and ord(tt)<=ord(t))
,Y(tt));
or a syntax equivalent.

Happy to help,
Henry Vermue

On Wednesday, February 20, 2013 2:04:49 PM UTC+1, Guillem Viñals Canal wrote:


Hi all,

I’m trying to write a code meaning X(t) = sum from t-p to t of the variable Y(t), which results in: X(t)= Y(t-p) + Y(t-p+1) + …+ Y(t) [p is a scalar data]

How can I constrain the sum this way? Thank you very much.

Guillem.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

\