Page 1 of 1

Extracting values from the vector

Posted: Thu Nov 17, 2016 8:53 am
by vytama
Hello,

I have a rowvector(50) with correlation values. I would like to take the values of specified columns from this rowvector and place in a new vector. For instance, I would like to take values from columns 5,7,10,25 and 50. What is the best way to achieve that? Thank you.

Re: Extracting values from the vector

Posted: Thu Nov 17, 2016 4:18 pm
by EViews Gareth

Code: Select all

newvector(1) = oldvector(5)

Re: Extracting values from the vector

Posted: Fri Nov 18, 2016 6:30 am
by vytama
Thank you Gareth, but how to make newvector(5) filled with values from five columns of oldvector(50)? Let's say column 5 has a value of 0.5, column 7 has a value of 0.3 and etc. I would like my newvector(5) to have values 0.5,0.3, ....). Thank you

Re: Extracting values from the vector

Posted: Fri Nov 18, 2016 6:49 am
by EViews Gareth
Fill them in one at a time.