comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Printing in one line
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Printing in one line [message #70455] Mon, 12 April 2010 17:05
fgg is currently offline  fgg
Messages: 67
Registered: April 2010
Member
Hi,

Here's an easy one. I have an array[5], y:

IDL> print, y
data = 1 2 3

and I'd like to make IDL print:

data = [1, 2, 3]

When I try:
IDL> m = n_elements(y)
IDL> print, y[0:1], '[', y[2:m-2]+',', y[m-1] + ']'

IDL prints:
fabio =
[
1, 2,
3]

How can I get this result in just one line (instead of 4)?

Thanks in advance,
Fabio
[Message index]
 
Read Message
Previous Topic: clever way to subregion an image?
Next Topic: IMAGE_STATISTICS for 3D Array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:17:37 PDT 2025

Total time taken to generate the page: 0.00355 seconds