Thanx so much, Mr Koo
i have just tested ur file, i got another two questions...
could u tell how to improve it ...
1. the data is stored manually into the array , but i need it automaticaly, just as i can store the peak values of the sine wave automaticaly into the array
2. the value stored cant be updated, how to modidify it, as it updated itself as First In First out....
thanx a million...
Eric