If you want to use it for a series of planar thin films, there is freely available MATLAB code from these guys: http://onlinelibrary.wiley.com/doi/10.1002/adma.201000883/abstract
Have a look at the paper to see if that's the kind of thing you need it for and if so, I think the code is somewhere on the group's website.