Page 1 of 1

converting vectors to a matrix

Posted: Fri Nov 08, 2013 3:44 pm
by Aaron
Dear All,

I would like to create a matrix and get a sub matrix from it.
For example

--------------
all 10

open data c:\temp\sample_1.xls
calendar(m) 1987:2
data(format=xls,org=obs) 1987:2 1987:11 E1 E2


com e = ||e1|e2||
pri / e
com a = %dims(e)
dis a
com ee = %xsubmat(e,1,2,1,2)

---------------

I generated a matrix with two 10 by 1 vectors so that I expect the dimension of matrix e becomes 10 by 2.
But it is not. Also matrix manipulation does not work.
How can I resolve this issue? Thank you!

Re: converting vectors to a matrix

Posted: Fri Nov 08, 2013 7:15 pm
by TomDoan
Series and matrices aren't interchangeable. For what you're trying to do, it sounds like

open data c:\temp\sample_1.xls
calendar(m) 1987:2
data(format=xls,org=obs) 1987:2 1987:11 E1 E2
make ee 1 2
# e1 e2

is what you want.

Re: converting vectors to a matrix

Posted: Sat Nov 09, 2013 5:17 am
by Aaron
I understand it now. Thank you very much!