Matlab scripts and function for microscopy image analysis