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!
converting vectors to a matrix
converting vectors to a matrix
- Attachments
-
- sample_1.xls
- (25 KiB) Downloaded 688 times
Re: converting vectors to a matrix
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.
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
I understand it now. Thank you very much!