Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > explain THIS on...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 5394 of 6022
Post > Topic >>

explain THIS one

by cmancone@[EMAIL PROTECTED] Feb 4, 2008 at 06:29 AM

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...
 




 4 Posts in Topic:
explain THIS one
cmancone@[EMAIL PROTECTED  2008-02-04 06:29:04 
Re: explain THIS one
David Fanning <news@[E  2008-02-04 07:48:52 
Re: explain THIS one
Spon <christoph.blau@[  2008-02-04 06:51:36 
Re: explain THIS one
cmancone@[EMAIL PROTECTED  2008-02-04 07:23:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 22:41:57 CDT 2008.