"Peak" Command

Scf3

Beta member
Messages
2
Help with "Peak" Command Please

I am just wondering how can I get the Peak command to register Peaks on the edges of a grid, instead of just inside the main body of the grid.
For Example...

5 6 7 8 9 1 3
2 4 5 2 6 8 3
1 7 3 8 4 0 5

How can I program to show that 9 would be considered a peak?
 
I am afraid I do not know what language you are coming from. Maybe someone else does. If I were programming a function to do this I would start with the first number in the array, compare it to the next, keep whichever number is greater and then compare that to the next value, keep the number that is greater, ect. At the end you would be left with the largest number in the array. You could use a for..Next loop, a Do..Loop, or a while..loop. Hope this helps.
 
Back
Top Bottom