Page 1 of 1
How Can I Export a Series of Symmetric Matrices?
Posted: Wed Dec 20, 2006 12:11 am
by Gregory
I have generated a series of 3x3 symmetric matrices that I would like to export to a text file as six columns but I'm not sure how. I tried using variations of the WRITE instruction with no luck. Any suggestions would be most appreciated.
Posted: Fri Dec 22, 2006 11:08 am
by TomM
Do you mean literally a variable of type:
SERIES[SYMMETRIC]
If so, the easiest way is probably to copy the data into a set of regular series and then use COPY. You could do it one at a time:
set ss11 = ss(t)(1,1)
set ss21 = ss(t)(2,1)
etc.
but an easier way is to create a [SYMMETRIC[SERIES]]. Assuming SS is your SYMM of SERIES, do:
dec symm[series] sser(3,3)
do row=1,3
do col=1,3
set sser(row,col) = ss(t)(row,col)
end
end
table
open copy save.txt
copy(for=prn,org=cols) / sser
close copy