(newbie) Find Max Number In An Array
- From: Nektarios - Greece <eizo5@xxxxxxxxxxxx>
- Date: Tue, 27 Jun 2006 13:29:00 +0300
(Using 'Delphi Enterprise 7')
Suppose you have a variable X as an input.
The program should calculate Y=2X+3 (for example) for X=X+1 up to X=X+50 and then find the minimum Y among these 50 Y's (Y1,Y2,Y3,...Y50).
The Y function i used for example (Y=2X+3) is not appropriate 'cause it's laminar. Anyway, think of a function (no matter what) that it DOES have ONE minimum in a X-Y graph. Usually, the minimum is at about X=X+10, but i want to find the exact X for SURE. That's why i need to calculate up to 'X+50'.
QUESTIONS
---------
Do i have to put each Y to an array [X,Y] and then find the minimum Y ?
How can i add the (X,Y) pair in an array and find the minimum Y ?
Also, i want to create a graph from these (X,Y) points.
Can i create a graph X-Y in Delphi ?
Thank you,
Nektarios
.
- Follow-Ups:
- (newbie) Find Max Number In An Array
- From: Dr John Stockton
- Re: (newbie) Find Max Number In An Array
- From: Uffe Kousgaard
- Re: (newbie) Find Max Number In An Array
- From: Marco van de Voort
- (newbie) Find Max Number In An Array
- Prev by Date: Re: Active component on form1 after closing form2
- Next by Date: Re: (newbie) Find Max Number In An Array
- Previous by thread: Logical expressions help! (newbie)
- Next by thread: Re: (newbie) Find Max Number In An Array
- Index(es):