GSET and output to the screen

For questions and discussion related to reading in and working with data.
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

GSET and output to the screen

Unread post by ac_1 »

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
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: GSET and output to the screen

Unread post by TomDoan »

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
...
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Re: GSET and output to the screen

Unread post by ac_1 »

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.
Post Reply