How Can I Export a Series of Symmetric Matrices?

For questions and discussion related to reading in and working with data.

How Can I Export a Series of Symmetric Matrices?

Postby Gregory » Wed Dec 20, 2006 1:11 am

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
Gregory
 
Posts: 20
Joined: Mon Nov 13, 2006 9:05 am
Location: Montreal

Postby TomM » Fri Dec 22, 2006 12:08 pm

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
TomM
 
Posts: 21
Joined: Tue Oct 24, 2006 3:34 pm
Location: Evanston, IL


Return to Data: Reading, Writing, Transforming

Who is online

Users browsing this forum: No registered users and 1 guest

cron