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

Home » Public Forums » archive » Do you find this weird too?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Do you find this weird too? [message #56853] Mon, 19 November 2007 02:04
lasse is currently offline  lasse
Messages: 48
Registered: February 2007
Member
Hi there,

hope this gets through to you guys, now with all the spam and whatnot.
Anywho, maybe this has come up before, here is some code

aa = randomu(12L, 200, 100)
ff = findgen(100)
maxs = max(aa, maxind, dimension=2)
print, maxind[0:10]
help, ff[maxind[0:10]]
plot, ff[maxind[0:10]]

Now I find this weird, because maxind is an array of longs clearly
bigger than the size of ff but IDL does not complain and plots
something (btw not what I want but this is solved with array_indices).
Is this something to do with the fact that maxind is a 1D
representation of 2D array indices? I hope it is because otherwise why
does IDL not fall over complaining that maxind[0], which on my machine
is 19200, is bigger than the size of ff.

Mhmm

print, ff[maxind[0]]

falls over

print, ff[maxind[0:1]]

doesn't.

btw print, !version
{ x86 linux unix linux 6.2 Jun 20 2005 32 64}

Cheers
Lasse
[Message index]
 
Read Message
Previous Topic: Re: NaN Magic Bingo!
Next Topic: IDL 7.0 Preview Review

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

Current Time: Fri Oct 10 11:57:39 PDT 2025

Total time taken to generate the page: 0.80093 seconds