Find the Max and Min for a table of number...

My table has 5 numbers in it and also the ability to add more to what the user sees fit. I want to be able to view the maximum and minimum of the table number. I made a loop, but I do not know how do select the highest or lowest number automatically without me selecting manually typing in the middle.

This is my code to determine this:

Determine the Min and Max brand
function maxandminMark() {}
var markIndex:int;
markIndex = (marks.indexOf (marks));
If (markIndex! = - 1).
{
for (var i = markIndex; i < marks.length; i ++)
{
brands [i] = marks [i + 1];
}
trace (maxandminMark);
}
}
}

Here are two ways...

1) walk through the comparison table of values

var numArray:Array = new Array (38,11,45,7,14,9,67,28);
var minNum:Number;
var maxNum:Number;
 
If (numArray.length > 0) {}
minNum = maxNum = numArray [0];
}
 
for (var i: uint = 1; i< numarray.length;="">
If (numArray [i]<>
minNum = numArray [i];
} ElseIf (numArray [i] > maxNum) {}
maxNum = numArray [i];
}
}
 
trace (minNum, maxNum);

(2) sort the array numerically and pull out the first and last items

numArray.sort (Array.NUMERIC);

trace(numArray[0],numArray[numArray.Length-1]);

Tags: Adobe Animate

Similar Questions

  • How to find the value max and min for each column in a table 2d?

    How to find the value max and min for each column in a table 2d?

    For example, in the table max/min for the first three columns would be 45/23, 14/10, 80/67.

    Thank you

    Chuck,

    With color on your bars, you should have enough experience to understand this.

    You're a loop in the table already.  Now you just need a function like table Max and min. loop.  And you may need to transpose the table 2D.

  • the window on my computer does not return to its original size and I can't use the max and min and exit button

    my window is too far to the right and ive tried to get to the original size and it will until a certain point to the left. This leaves me unable to use the max and min and exit tabs

    Hello

    1. What is the brand and model of the computer?

    2. is it a laptop or a desktop computer?

    3. the problem occurs after leaving the game or program?

    4 did you a recent software or changes to the material on the computer?

    Method 1:

    If this happens when you leave a game, I suggest you to follow the steps mentioned in the link and check.

    Open the troubleshooter of display quality

    http://Windows.Microsoft.com/en-us/Windows7/open-the-display-quality-Troubleshooter

    Method 2:

    I also suggest you go through the steps mentioned in the link and the Coachman.

    Change your screen resolution

    http://Windows.Microsoft.com/en-us/Windows7/change-your-screen-resolution

    Method 3:

    Step 1:

    I also suggest you to check if the problem persists in safe mode.

    Start your computer in safe mode

    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

    Step 2:

    You can also check if the problem persists in a clean boot state.

    Clean boot:

    This could happen if one of the substantive programmes is in conflict with the proper functioning of your computer. To help resolve the error and other messages, you can start Windows 7 by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7 http://support.microsoft.com/kb/929135

    Note: when you are finished troubleshooting, follow step 7 article to start the computer to a normal startup.

    Hope this helps and keep us posted.

  • How to find the Maxima and Minima for each column of a 2D array?

    Hello

    I have a 2D chart and I would find the maxima and minima of each column of the 2-D table. Even though I know how to get maxima and minima for the whole picture but don't know how columnwise? Any ideas please?

    Thank you

    Rohit

    Hello

    @Smercurio-What you said is true, I should have shown using automatic indexing enabled which is really excellent choice. I just tried to show in a very simple way.

    Anyway, here's the best way

  • Time series: finding max and min for each month

    Hello world. I'm working on a datasheet that has collected the data points for all day for the past 15 years.

    A column stores the date and column B contains a numeric value.

    I want to do the following:

    Create a new table (call it table #2) that:

    (1) is now a time series on a monthly basis (column A contains "year month"). This is why the table contains a header and 15 * 12 = 60 rows of data

    (2) B Col contains the Max value of this month.

    (3) C Col contains the value this month min

    Table #2 should be calculated automatically because I need to find these values for several series. Any ideas?

    Here is a way that I came up with

    In the table above, your original data is in columns B and C.

    I've added three additional columns (A, D and E):

    D2 = Year (B2) & NUMTOBASE (MONTH (B2), 10, 2)

    It's shorthand dethrone select D2, and type (or copy and paste it here) the formula:

    = Year (B2) & NUMTOBASE (MONTH (B2), 10, 2)

    E2 = IF (D1≠D2, 0, E1 + 1).

    Select copy of D2 to E2,

    Select cells D2 at the end of column E, block

    A2 = D2 & NUMTOBASE (E2, 10, 2)

    Select A2, copy

    Select A2 at the end of the A2 column, paste

    now create a second table summary as shown:

    For 'Summary Table 2016:

    the first four lines are the lines of header

    There are 35 total lines

    Enter the year in cell B1

    A5 = −4 LINE)

    B5 = SIERREUR (VLOOKUP ($B$ 1 & NUMTOBASE(B$4,10,2) & NUMTOBASE($A5,10,2), data: $A:$ C, 3, 0), "")

    Select cell B5, copy

    Select cells B5 at the end of row 5, dough

    Select A5 thru M5, copy

    Select cell A5 at the end of the M column, paste

    B2 = MIN (B)

    B3 = MAX (B)

    Select the cells B2 to B2, copy

    Select the cells B2 through M3, dough

    now duplicate the table and change the year to 2015 for the next year.

    You can duplicate this table as necessary to summarize a year

  • read the max and min of each column value

    Dear qudoe

    I'm doing a program in labview that challenge me to fight with a time.

    Here, I enclose my labview code in which I have a data file, which includes 500 columns that I need to find the values min and max of each column.

    I tried my best, but it takes 30 seconds to find the min and max value of each column.

    I want to do this in less than a second.

    so can anyone suggest me any necessary correction that can stimulate my program.

    You don't have to open and close the file in a loop all the time and also you don't really need some time for this. Check the related code.

    Of course, you can still optimize it for best performance, I just did a quick project to show how simple it is.

  • drop the max and min values

    Hi all

    I have a table with the following columns that contain the ranks of teams as follows:
    A-B-C-D-E-F
    20-21-22-23-24-20
    21-23-32-25-22-19
    24-23-16-24-24-22

    I need a calculation of percentage where I drop the highest and the lowest in each team ranks, then divide the total by 100 remaining.

    for the first record:
    20 is the minimum and 24 max would be the percentage (21 + 22 + 23 + 20) / 100
    for the second record:
    percentage = (25 + 21 + 23 + 22) / 100
    the third record:
    percentage = (23 + 24 + 24 + 22) / 100

    Thank you
    Sneha

    Like this?

    SQL> WITH t AS (
      2  SELECT 20 a, 21 b, 22 c, 23 d, 24 e, 20 f FROM dual UNION ALL
      3  SELECT 21, 23, 32, 25, 22, 19 FROM dual UNION ALL
      4  SELECT 24, 23, 16, 24, 24, 22 FROM dual)
      5  SELECT ((a + b + c + d + e + f) - GREATEST(a, b, c, d, e, f) - LEAST(a, b, c, d, e, f)) /100 mids
      6  FROM t;
    
          MIDS
    ----------
           .86
           .91
           .93
    

    John

  • Cannot find the driver and software for the Nexus S phone

    I got the nexus S smartphone and can not find the driver on my windows vista computer, I want to be able to put my favorite and the music on my new phone, help show the search but no results.

    Thank you

    Hi Michelle,

    What is the model number of the phone you are using?

    You must contact the manufacturer of the phone and locate the Windows Vista drivers.

    For more information, you can consult the following article:

    Updated a hardware driver that is not working properly

    Hope this information is useful.

  • find the max and downs of resource_limit

    Hello

    Version: 10.2.0.1 and 11.2.0.1
    OS: Aix 6

    I want to find the maximum number of sessions (high water) in a given period and the lowest level in a given time, and also for the process.

    The low use of the tablespace temp/Cancel in a given period of time? and also more strong use a time given?


    There is an opinion?
    Any suggestions

    Thank you.

    (1) for the sessions and processes, if you have the license for AWR views

    ), SELECT begin_interval_time, end_interval_time,.
    resource_name, current_utilization,
    max_utilization
    Dba_hist_resource_limit a, dba_hist_snapshot b
    WHERE a.snap_id = b.snap_id AND resource_name (the 'sessions' PROCESS),
    ORDER BY begin_interval_time;

    (2) for the use of the cancellation/temp
    You can check DBA_HIST_TBSPC_SPACE_USAGE

  • Where can I find the drivers and software for the LaserJet Pro M1132 MFP on Mac OS Mountain Lion?

    Hello

    According to http://support.hp.com/us-en/document/c01664444 it doesn't seem to be a software and drivers for the LaserJet Pro M1132 MFP.

    When will they be available?

    I read in http://support.hp.com/us-en/document/c03427752 that "today, a solution for your printer is not available for the Mountain Lion. However, an update of the driver will be available in fall 2012 . "Since it's already winter 2012, a solution will be available before January 2013?

    Thank you.

    Hi Chun Pong,

    Seems to download the software I mentioned before has been deleted. This means that a new driver will be downloaded.

    Please visit the site from time to time if a new software is available. I'll keep an eye as well and provide an update here, if the new software can be downloaded. It may take a few days.

  • find the port and URL for EM after the installation of the database

    Hello

    I use the database oracle 10g on windows platform.actually I forgot to notedown URL for the Enterprise Manager after installation of my oracle database.

    now I want to access my business manager, but do not know the RL.

    can someone tell me please how to find URL for Enterprise Manager 10g database after installation? where he is saved?

    Thanks and greetings
    VD

    Hello..

    Yes, it should work... That's what I was going to write in my reply - to check the readme file. Well, I'm just having a database on my pc and the emca_date_time file contains the following lines at the end.

    CONFIG: No value has been set for the ORACLE_HOSTNAME parameter.
    November 26, 2008 18:32:47 oracle.sysman.emcp.util.ClusterUtil getLocalNode
    CONFIG: isLocalNodeDone: true localNode: null
    November 26, 2008 18:32:47 oracle.sysman.emcp.EMDBPostConfig performConfiguration
    INFO: > database control URL is http://Anand:1158 / em

    Anand

  • Max and min to find examples of data

    I'm discerning the max and min of cycle data values. We have about 20 data points for each cycle and I need make the max and min out of it. I tried to write a script for this but it takes way to long to run. Do not complete our largest files (over 1 million points of data) with my script and DIAdem crash.  I also tried the peak built by finding functions, but they come with data points that are not max or min. Here is my script below:

    Dim cyclemin
    Dim cyclemax
    Dim cyclecount
    Dim displacementmax, displacementmin
    Dim channelcount
    Dim i, j, k, g, a, m
    cyclemin = CMin ('Cycle Count')
    cyclemax = CMax ('Cycle Count')
    ChannelCount = 0
    Call ChnAlloc ('Single Cycle Count',(cyclemax-cyclemin) + 1, 1, DataTypeFloat64)
    Call ChnAlloc ("pressure min. sample",(cyclemax-cyclemin) + 1, 1, DataTypeFloat64)
    Call ChnAlloc ("Sample pressure Max",(cyclemax-cyclemin) + 1, 1, DataTypeFloat64)
    a = 1
    For cyclecount = cyclemin to cyclemax
    g = 1
    ChannelCount = channelcount + 1
    I = ChnFind ('Ch ()' ' Cycle Count"" "") = "& str (cyclecount)(,a)"
    j = ChnFindReverse ("Ch (" 'Cycle Count) "" ") =" & str (cyclecount), CL ('Cycle Count')) "
    Dial the ChnAlloc ("sample Pressure data retention", (d - i) + 1, 1, DataTypeFloat64 ')
    For k = i j
    ChD (g, "" data keeps the pressure of the sample "") = SMC (k, "Sample pressure")
    g = g + 1
    Next
    Call the ChnCharacter (' "data keeps the pressure of the sample" ")
    ChD (channelcount, ' Single Cycle Count "" ") = cyclecount
    ChD (channelcount, "Max pressure sample") = CMax ("Data Hold sample pressure")
    ChD (channelcount, "pressure min. sample") = CMin ("Data Hold sample pressure")
    Call the ChnDelete (' "data keeps the pressure of the sample" ")
    a = j
    Next

    Can someone please help me find a way to do it quickly? Thank you.

    Hello Steinmeister85

    just in case you are using a newer version of DIAdem, here is an alternative solution.

    Also, I used your example file and it concatenated 50 times to create a file which has about 560,000 values in each channel.

    I run your script from a new one to get a reference number

    Sample file

    Original screenplay: 2.5 seconds

    Optimized script: 0.2 seconds

    50 x example file

    Original screenplay: 111,493 seconds

    Optimized script: 0.25 seconds

    I have to admit that I've sorted the concatenated file. This way I have 216 cycle segments to be analyzed. If I simple concatenate files (without sorting) I get 50 x the number of segments and the new script takes about 9 seconds to execute. The original script doesn't work properly like you woul then have to repeat the cycle count numbers in different areas of the channel...

    I hope that the new versions work for you.

    Andreas

  • Max and min of the 2d array

    Hello

    can someone show me how to make a max and min of a 2d array

    I am oonly watching colum 0,1,2

    the max of 0,1,2

    the min of 0,1,2

    in my example, it would be 13.612 is max and min 10.059

    I think I must make two loop for, but I have not figured out how.

    Thanks in advance.

    super_saiyans wrote:

    Yes. It can

    but I don't want to look at the column 3,4,5

    Subset of the table allows to remove.

  • XY Graph-Y-scale visible on the scale of Y corresponding watch still false Max and Min

    Hi guys,.

    I use the XY graph to display the data with 3 Y-scales.

    When I put any scale Y property visibility to False, its display even the Y scale Max and Min range lines in the plot area of the chart and cross line or additional parallel line with other visible scales.

    Attached to the page Ref.

    And I know that the cross-line may be due to different ranges of scales is defining. But the XY graph does not show the scales are invisible and possessions as well.

    Please provide your suggestions to avoid this.

    Scales and lines associated with these scales are separate properties. I've never tried and now I'm not in front of a computer, but should have properties for the definition of the grid line color. Implement transparent.

    Mike...

  • in the header problem report the actual display Max and Min...

    Hi guys,.

    I have the following problem.

    1. I have a multi selection prompt where you take 2 years.

    2. I have the following columns. Year, month, Exp, calc YEAR (max), calc (min)

    3. I need to get the months max and min across all lines. So far, I tried MAX, MIN, RMAX and RMIN without success. However, it is not picking up along all lines. For example,.

    2001 1 100050 2001 2001
    .....
    2002 1 244005 2002 2002

    I'm sure it has to do something with my aggregation in the computed column, but not quite sure where exactly.

    c max (max (year)) and min (min (year))

    :)

Maybe you are looking for

  • The desktop icon is still active / highlighted

    original title: the desktop icon are active... problem. When you copy an email from outlook on my desktop, I answered Yes to the question regarding making the active icon.  After doing this my desktop refreshes very slowly. In addition, all the icons

  • How to attach photos to send

    original title: HOW to reach HER photo TO AN EMAIL I tried several times to attach pictures of MY PICTURES to emails.  I found several places online that give me instructions, and I follow them to the letter.  However, it should still work!  Can some

  • No bars of tasks online, homepage, or otherwise.

    I had my Firefox server. Not now that there is no task bar. There is a tab with Firefox on it, but it does nothing. There is no bar to talk about that so I can't offline online. To stop manually. In the box is the homepage. Do not know where he was g

  • How can I avoid several selected files are copied / duplicated in a folder

    When I start to select several files, for example in my images, for copy and move to a new folder, Win 7 a copy of the files in the source folder automatically creates before that I got the chance to copy and paste my choice to the new folder. How ca

  • Upgrade Windows 7 Pro 32 bit edition edition upgrade upgrade windows 7 Pro 64-bit

    I have an upgraded version of Windows 7 Pro 32 bit in the supply of Digital River in 2009.My computer can handle 64 bit, I just chose 32 bit out of habit at the time. Now I'm hoping to improve my memory a little, but 32 bits can not handle. I have a