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

Home » Public Forums » archive » Re: HISTOGRAM and string data
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: HISTOGRAM and string data [message #53802 is a reply to message #53799] Thu, 03 May 2007 09:08 Go to previous messageGo to previous message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
Caught up in doing things "the IDL way", my brain just quit on me.

"The Klunky Way":

IDL> unique_i = uniq(STRING_DATA,sort(STRING_DATA))
IDL> unique_strings = STRING_DATA[unique_i]
IDL> STRING_CODE = intarr(n_elements(STRING_DATA))
IDL> for i=0l,n_elements(unique_strings)-1 do $
IDL> STRING_CODE[where(STRING_DATA eq unique_strings[i])] = i

All the fancy HISTOGRAM magic then works like a charm on STRING_CODE.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: 3D registration
Next Topic: problem with writing a 2D image .tiff

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

Current Time: Tue Dec 02 10:06:13 PST 2025

Total time taken to generate the page: 1.28489 seconds