I want to assign the existing values of variables to another variables using either of the following:

- loop statement

- for statement

- if-else statement Or

- while statement

Code: Select all

```
sets
tt /tt1*tt5/
t /t1*t10/
;
Variables
X(tt) , Y(time);
X.fx('tt1') = 1;
X.fx('tt2') = 2;
X.fx('tt3') = 3;
X.fx('tt4') = 4;
X.fx('tt5') = 5;
Y.fx('t1') = X.l('tt1');
Y.fx('t2') = X.l('tt1');
Y.fx('t3') = X.l('tt2');
Y.fx('t4') = X.l('tt2');
Y.fx('t5') = X.l('tt3');
Y.fx('t6') = X.l('tt3');
Y.fx('t7') = X.l('tt4');
Y.fx('t8') = X.l('tt4');
Y.fx('t9') = X.l('tt5');
Y.fx('t10') = X.l('tt5');
```