GSET and output to the screen

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

GSET and output to the screen

Postby ac_1 » Mon Jan 03, 2011 10:22 am

After using the GSET command, can someone tell me what command I use to DISP/WRITE/PRIN etc etc output to the screen ?

If I use DISP I get: DISPLAY cannot show SERIES(VECTOR)

If I use WRITE, RATS crashes - and I get: RATS32s.exe has stopped working

If I use PRIN, I get: ## SX22. Expected Type Entry Value, Got SERIES(VECTOR) Instead etc
ac_1
 
Posts: 56
Joined: Thu Apr 15, 2010 6:30 am
Location: Surrey, England, UK

Re: GSET and output to the screen

Postby TomDoan » Tue Jan 04, 2011 11:12 am

You would have to do that an element at a time (DISP vseries(entry) or WRITE vseries(entry)). If you need to see the whole range of it, you can do that in a loop. An alternative is to break it into a VECT[SERIES] and use PRINT. For instance, this creates a VECT[SERIES] V from a calculation which is much like a GSET.

Code: Select all
dec vect[series] u(nvar) v(nvar)
do i=1,nvar
   set u(i) hstart hend = 0.0
   set v(i) hstart hend = 0.0
end do i
*
...
   do t=hstart,hend
      compute %pt(v,t,ff*%xt(u,t))
   end do t
...
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: GSET and output to the screen

Postby ac_1 » Wed Jan 05, 2011 10:26 am

Okay thanks. The reason for wanting GSET's result, is that GSET is used in the Mixture Models Chapter on the SMS course and so that I may understand certain calculations within programs (which in this instance I do) I sometimes like displaying/writing/printing the calculations etc onto the screen.
ac_1
 
Posts: 56
Joined: Thu Apr 15, 2010 6:30 am
Location: Surrey, England, UK


Return to Data: Reading, Writing, Transforming

Who is online

Users browsing this forum: No registered users and 0 guests