Redefine Median Filter in Matlab
You can shadow a built-in function as long as the newly defined function is higher on the function precedence order. 

Note, however, that this is not recommended because:


It makes your code harder for someone else to understand
It makes your code harder to debug if something goes wrong


and plenty of other reasons.

As the commenter noted, it is usually better to just define a new function that does what you want with a different name. 

EDIT:

If you are looking for specific ways to do something similar to a median filter, one place to look would be pseudomedian filters.