will this do? This is the data generated by adding noise to an arbitrary line.
![1](https://f.cloud.github.com/assets/5661623/2367228/6814d518-a74a-11e3-8989-45d67ebe6599.png)

and this will be the output
![2](https://f.cloud.github.com/assets/5661623/2367229/9a78a89a-a74a-11e3-9efb-04f5d9597a76.png)