How Can I Export a Series of Symmetric Matrices?

For questions and discussion related to reading in and working with data.
Gregory
Posts: 20
Joined: Mon Nov 13, 2006 8:05 am

How Can I Export a Series of Symmetric Matrices?

Unread post 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.
"You sound pretty good, kid, but can your mom recognize you on the radio?"
- Les Paul
TomM
Posts: 20
Joined: Tue Oct 24, 2006 3:34 pm

Unread post 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
Tom Maycock
Estima

support@estima.com
Post Reply