MATLAB: Built-in library function x() when copied into the current working directory does not get path to another built in library y() called from the function x() which was copied to the current working directory

MATLABmatlab function

Why built-in library function x() when copied into my current working directory does not get path to another built in library y() called from the function x() which was copied to my current working directory?
for example >>> Lets a there is a built-in function x(). It calls built-in function y(). I have copied that function x() into my current working directory. Now it is not getting path function to y(). I have not changed any path set-up. It is same as when it was working.