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

Home » Public Forums » archive » explain THIS one
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
explain THIS one [message #58536] Mon, 04 February 2008 06:29
cmancone is currently offline  cmancone
Messages: 30
Registered: May 2007
Member
I'm having an error in my code and I stop it to check out what is
going on. Here's the three relevant lines of code:

minmag = min(sims[mag,*],max=maxmag)
nbins = (maxmag-minmag)/magbinsize
magres = fltarr(3*nfilters,nbins)

Here's some commands I type into a command line to investigate my
issues:

IDL> help,nbins
NBINS FLOAT = 7.00000
IDL> help,magres
MAGRES FLOAT = Array[6, 6]

Anyone see a problem here? nbins is a float of size 7.0, and yet
magres ends up with 6 rows!!!! To add to the fun I then type the
following:

IDL> nbins = 7.0
IDL> magres = fltarr(3*nfilters,nbins)
IDL> help,magres
MAGRES FLOAT = Array[6, 7]

To summarize, my array is created with the wrong dimensions, so I re-
assign one of the variables with the exact same value that it had
before, recreate my array, and it works! ?????? Looks like a bug to
me...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: About IDLffDICOM
Next Topic: Re: explain THIS one

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

Current Time: Wed Oct 08 19:21:40 PDT 2025

Total time taken to generate the page: 0.00474 seconds