Maxloc - multiple maxima

From: Roy Plotnick (plotnick_at_uic.edu)
Date: 05/19/04


Date: 19 May 2004 10:43:25 -0700

For a simulation, I need to need the array location of the maximum
value. I have been using MAXLOC for this. I just realized that is
always picks the first element in the array having the maximum value;
this produces a bias in the simulation if more than two equal maximum
values exist. Any suggestions of how to get around this? The arrays
I need to query are small.
-Roy Plotnick



Relevant Pages

  • Adding Threads to a Sequential Program help!
    ... A basic thread question that i can't seem to find an answer to in the ... I've written a MonteCarlo simulation program in Java (with minimal use ... by index or value, "casting" an array of floats to ints, etc. ... Fundamentally, then, what I want to do is run doSimulation twice (each ...
    (comp.lang.java.programmer)
  • Re: [OT] Re: model implementation
    ... if my model consists of a number of units that hold a ... >> simulation or calculate the change in the units over time? ... > the array after asking for the simulation length in days. ... > indicate the amount of the content of each of the levels to be added (or ...
    (comp.lang.cpp)
  • [OT] Re: model implementation
    ... I want to know the very basics of model ... What I did was create a two-dimensional array of double values, ... The total length of the simulation was a value I let the user decide, ... calculating each level's new content based entirely on the values ...
    (comp.lang.cpp)
  • Re: Simple optimization
    ... number in the array. ... might begin to see patterns in the simulation. ... generator once, make as many numbers as needed, then get rid of it. ... certain areas - the real world doesn't go in for normal distributions as ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Reading from a excel sheet to an array
    ... each simulation output is basically a 10 rows by 1 column range in sheet2. ... this results need to go into an array called FinalOutput which would be a 26 by 10 array. ... I want to read the entire range "b60 to b85" in sheet2 into the FinalOutput array. ...
    (microsoft.public.excel.programming)