Naming matrices

For questions regarding programming in the EViews programming language.

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

mvictor96
Posts: 20
Joined: Tue Dec 19, 2017 9:23 am

Naming matrices

Postby mvictor96 » Wed Feb 07, 2018 5:24 am

As part of a loop I am trying to create a matrix named after an element of an svector. However this is not working. Can anyone tell me my mistake.

svector(16) svec2

svec2(1) = "austria1"
svec2(2) ="belgium1"
svec2(3) ="denmark1"
svec2(4) ="finland1"
svec2(5) ="france1"
svec2(6) ="germany1"
svec2(7) ="greece1"
svec2(8) ="ireland1"
svec2(9) ="italy1"
svec2(10) ="luxembourg1"
svec2(11) ="netherlands1"
svec2(12) ="portugal1"
svec2(13) ="spain1"
svec2(14) ="sweden1"
svec2(15) ="switzerland1"
svec2(16) ="united_kingdom1"


for !i=1 to 16

matrix(7,1) svec2(!i)

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

Re: Naming matrices

Postby EViews Gareth » Wed Feb 07, 2018 9:25 am

Code: Select all

%a = svec2(!i)
matrix(7,1) {%a}
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 4 guests