Suppose I have a function called Test in Matlab as follow:
function [f, varargout] = Test(I,varargin)
When I run this function on a specific input, the execution time is 0.019661 Sec.
If I copy the whole body of the function and paste it in a new .m file and name it as Tes1, I would have the same function with a different name like
function [f, varargout] = Test1(I,varargin)
Now, when I run function Test1 with same input as Test, the execution time is 0.055111 Sec.
The question is: what is the reason for that? Your answer is appreciated.