lemme tell u a trick!! but it need a lot of effort but lesser than coding u r self..!!
here u go..
> edit xcorr
you can see the source code od xcorr
decode the source code..take only wat u want ... i mean ignore all the type check and error control stuf... just take the core part of the function.
paste it to a new file ... myxcorr.m
and change all the variable name and make it look diffrent... and u r done!
best of luck!!
this technique worked for me!! and it will work for u too