0

Good Morning, I have an array with about 3000 double values, I need to find all local minimum and maximum, for this I'm interested to first and second derivative, what's best way to achieve this with Apache Commons Math? My trouble is that I'm starting directly from the array, not from a function like sin(x). Thanks

Etantonio
  • 359
  • 1
  • 5
  • 13

1 Answers1

0

With just an array you wont be able to find a min/max.

If the array was calcualted from a known function, then you could differentiate it numerically (just calculate at X and X + epsilon, and divide by epsilon, assuming that there's a single parameter that you're differentating with respect to).

Alternatively, is the array actually the list of coefficients of a big polynomial? If so, then the same approach might work.

davidsheldon
  • 38,365
  • 4
  • 27
  • 28