Create filter2.m

Updated version of filter.m