matlab script for median plot added