Re: (newbie) Find Max Number In An Array
- From: Marco van de Voort <marcov@xxxxxxxx>
- Date: Tue, 27 Jun 2006 12:34:48 +0000 (UTC)
On 2006-06-27, Nektarios - Greece <eizo5@xxxxxxxxxxxx> wrote:
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 ?
No, because the minimum might not be a whole number. Probably you should
either calculate the derivative of the function, and equate that to zero, or
try a numeric solving solution.
This all depends on the border clauses of your problem.
How can i add the (X,Y) pair in an array and find the minimum Y ?
Are you sure you have to do this?
Can i create a graph X-Y in Delphi ?
Yes.
.
- Follow-Ups:
- Re: (newbie) Find Max Number In An Array
- From: Nektarios - Greece
- Re: (newbie) Find Max Number In An Array
- References:
- (newbie) Find Max Number In An Array
- From: Nektarios - Greece
- (newbie) Find Max Number In An Array
- Prev by Date: (newbie) Find Max Number In An Array
- Next by Date: Re: (newbie) Find Max Number In An Array
- Previous by thread: (newbie) Find Max Number In An Array
- Next by thread: Re: (newbie) Find Max Number In An Array
- Index(es):