Random paramter filtering algorithm implemented in matlab