You also should check out the News Rover program that automatically scans Usenet newsgroups, downloads messages of interest to you, decodes binary file attachments, reconstructs files split across multiple messages, and eliminates spam and duplicate files.

Sine Wave Fitted To Data

This example fits an equation that has a sin function.
Three parameters are calculated: Frequency, the frequency of
the sine wave; Amplitude, the height of the sine wave, and
Offset, the offset above or below the axis about which the
sine wave is oscillating. The Sweep
statement is used to try different starting values for the
Frequency parameter, looking for one that will converge.