This Laboratory
Instructions
C Code for the last part
Best code
but you need GSL for it.
code without GSL
This one in C++