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

Home » Public Forums » archive » Random sample selection without replacement (using IMSL_RANDOM_SAMPLE)
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
Random sample selection without replacement (using IMSL_RANDOM_SAMPLE) [message #78018] Fri, 21 October 2011 02:59
Patrick Leinenkugel is currently offline  Patrick Leinenkugel
Messages: 5
Registered: June 2011
Junior Member
Hello,
I like to generate a random selection (eg. 5 samples) of a population
without replacement from a one dimensional array with n samples (eg.
n=100). I tried to use the IMSL_RANDOM_SAMPLE function which works
fine if I have (k,n) dimensional arrays (k variables (e.g k=2), n
samples( e.g n=100)).
For one dimensional arrays, however, the command

samp = IMSL_RANDOM_SAMPLE(5, pop)

results in the error message: "IMSL Error: IMSL_RANDOM_SAMPLE:
Terminal error: STAT_BAD_NROW_NSAMP: NROW = 1 and NSAMP = 5. Since
there is only one invocation of this function, NROW must be greater
than or equal to nsamp."

Can anyone tell me what I do wrong or has a nother way to easily
generate random selection without replacement.
Thanks,
Patrick
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: get lat/lon from modis SIN grid
Next Topic: Re: ENVI evf File Format

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

Current Time: Thu Oct 09 14:48:46 PDT 2025

Total time taken to generate the page: 1.51967 seconds