vectors to matrix

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

jolly
Posts: 18
Joined: Mon Jun 20, 2011 10:52 am

vectors to matrix

Postby jolly » Fri Aug 26, 2011 10:52 am

Hello,

I have to wectors and I want to group them into matrix. How can I do it?

Thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13584
Joined: Tue Sep 16, 2008 5:38 pm

Re: vectors to matrix

Postby EViews Gareth » Fri Aug 26, 2011 10:53 am

Make a matrix of the correct size, then use the colplace function to put your vectors into the matrix.

jolly
Posts: 18
Joined: Mon Jun 20, 2011 10:52 am

Re: vectors to matrix

Postby jolly » Fri Aug 26, 2011 11:06 am

thank you. And another question. when i try to use yours function. it's said that one of my vectors values are not numerical. How I should convert them to numerical?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13584
Joined: Tue Sep 16, 2008 5:38 pm

Re: vectors to matrix

Postby EViews Gareth » Fri Aug 26, 2011 11:31 am

@val

jolly
Posts: 18
Joined: Mon Jun 20, 2011 10:52 am

Re: vectors to matrix

Postby jolly » Fri Aug 26, 2011 12:05 pm

suppose, mu vector is MM and I shoul convert him. so how it's decribe with function @val. ?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13584
Joined: Tue Sep 16, 2008 5:38 pm

vectors to matrix

Postby EViews Gareth » Fri Aug 26, 2011 12:06 pm

If Mu is a vector, it, by definition, already contains numerical data.

stevecsp
Posts: 4
Joined: Sun Sep 18, 2011 8:03 pm

Re: vectors to matrix

Postby stevecsp » Sun Sep 18, 2011 8:10 pm

Hi, eviews.

I would also like to use colplace function to insert a column vector in the the matrix. However, it requires me to insert a column vector with the same number of rows as the matrix.

So what if some of my column vectors is shorter than the the matrix? How can I insert them into the "larger" matrix? Thank you.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13584
Joined: Tue Sep 16, 2008 5:38 pm

Re: vectors to matrix

Postby EViews Gareth » Sun Sep 18, 2011 9:18 pm

matplace

stevecsp
Posts: 4
Joined: Sun Sep 18, 2011 8:03 pm

Re: vectors to matrix

Postby stevecsp » Mon Sep 26, 2011 1:30 am

Thanks a lot. It works


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests