Re: (newbie) Find Max Number In An Array
- From: Nektarios - Greece <eizo5@xxxxxxxxxxxx>
- Date: Tue, 27 Jun 2006 16:16:18 +0300
Marco van de Voort wrote:
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.
The final function is more complicated. The function i used above is just a sample example. The real function is Y(x1,x2,x3,x4,x5,x). :)
But for known x1,x3,x3,x4,x5 i want for one X to find Y value.
I used Excel but then i can SEE the minimum in the graph. The problem is that i want to do the same thing in Delphi.
.
- Follow-Ups:
- Re: (newbie) Find Max Number In An Array
- From: Marco van de Voort
- Re: (newbie) Find Max Number In An Array
- References:
- (newbie) Find Max Number In An Array
- From: Nektarios - Greece
- Re: (newbie) Find Max Number In An Array
- From: Marco van de Voort
- (newbie) Find Max Number In An Array
- Prev by Date: Re: (newbie) Find Max Number In An Array
- Next by Date: Re: (newbie) Find Max Number In An Array
- Previous by thread: Re: (newbie) Find Max Number In An Array
- Next by thread: Re: (newbie) Find Max Number In An Array
- Index(es):
Relevant Pages
|