Of course, there are differnt ways of realising that script. I would program a loop that is repeated once for each interval (65 Points). Within this loop you can use the Statblockcalc function to find out min/ max/mean value of this interval. After the calculation you can use variables as statmin and statmax to access the results (e.g. store them into a channel with chdX).
In that way you can create a channel containing the max value of each interval. Now its easy to do the remaining calculation. Use the calculator tool (formulacalc command, respectively) to apply a formula on each row of a channel. You might find the cch - command helpful to calculate the mean value of a channel.
Please refere to the DIAdem help to get further information concerning the script commands I
mentioned above.
Ingo Schumacher
Application Engineering
National Instruments