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

Home » Public Forums » archive » concerverting a vetor to string
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: concerverting a vetor to string [message #45996 is a reply to message #45909] Thu, 20 October 2005 23:41 Go to previous message
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
Hi Francois,

try

IDL> a=[1,2,3,4]
IDL> b=fix(strjoin(strcompress(string(a),/rem)))
IDL> print, b
1234

So, string(a) makes a 4-elemen array of strings, strcompress(,/rem)
removes all blanks from the individual strings, strjoin() puts them all
together into one, and finally fix() converts the one string into a
number.

Cheers,

Peter
[Message index]
 
Read Message
Read Message
Previous Topic: L1 Norm?
Next Topic: map_set miracle

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

Current Time: Sat Oct 11 09:13:20 PDT 2025

Total time taken to generate the page: 1.19707 seconds