Merging vectors in one vector

Use this forum to post Vensim related questions.
Post Reply
sosorior
Junior Member
Posts: 16
Joined: Mon Oct 28, 2013 8:11 pm
Vensim version: DSS

Merging vectors in one vector

Post by sosorior »

Hello, I wonder if it is possible to merge different vectors in one vector in vensim. For instance, assume I have 2 subscripts: sub 1 and sub 2.
sub1= a, b
sub2= c, d
x[sub1]=1, 2;
y[sub1]=3, 4;

So I want to create a vector, whose size would be 4 resulting from the size of sub1 and sub2. Then the resulting vector would be:
sub3= a, b, c, d;
z[sub3]=1, 2, 3, 4;
Administrator
Super Administrator
Posts: 4611
Joined: Wed Mar 05, 2003 3:10 am

Re: Merging vectors in one vector

Post by Administrator »

You can define sub3 as

sub3 : sub1,sub2

Then you can have multiple equations for z,
z[sub1] = x[sub1]
z[sub2] = y[sub1]
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply