Page 1 of 1

copy data from table and paste in matrix

Posted: Sun Feb 23, 2014 11:15 pm
by neptunhiker
Hi,

I can't seem to find the solution to copy data from a table and paste it into a matrix using some program lines. Below you will find a an example workfile with a table and a matrix that is supposed to contain the data from the table.

Code: Select all

wfcreate(wf=test) u 30 series a1=@nrnd series a2=@nrnd group myseriesgroup a1 a2 freeze(mytable) myseriesgroup matrix mymatrix ' How to put the data from "mytable" into "mymatrix"? ' The following line doesn't work, but that's what I want to do, i.e. put the data from "mytable" starting at row 3, column 2 and ending at row 32, column 3 into "mymatrix" at position row 1, column1. 'mymatrix(1,1)=mytable(3 2 32 3)


I tried using "copyrange", but that command only works when copying from a table to another table. The solution seems to be easy, but I can't find it. Thanks a lot for help.

Re: copy data from table and paste in matrix

Posted: Sun Feb 23, 2014 11:22 pm
by EViews Gareth
You have to loop through the elements one at a time.

Re: copy data from table and paste in matrix

Posted: Wed Mar 26, 2014 10:37 am
by neptunhiker
Ok, thank you for your reply.