in reply to Any idea for predicting the peak points in the graph by perl

what do you mean exactly by "gradual"?

If there is some noise in your input data that causes small peaks to appear, then you need to apply a filter first.

For example, substitute every element by the mean of its predecessor, the element itself and its successor. If this is not enough, try extending the mean to cover more elements around. You can also ponderate the mean calculation so nearer elements have more weight, i.e.:

$fd[$n] = ( 0.25*$d[$n-2] + 0.5*$d[$n-1] + 1.0*$d[$n] + 0.5*$d[$n+1] + 0.25*$d[$n+2] ) / (0.25+0.5+1.0+0.5+0.25);

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.