Using Google Translate, I gather that you wish to calculate the peak memory usage of a program, without the use of the "memory" function.
Kindly refer to the following MATLAB Answers post, which provides a function to help monitor memory usage: https://www.mathworks.com/matlabcentral/answers/97560-how-can-i-monitor-how-much-memory-matlab-is-using. The program uses the "whos" command, but automatically does it for variables in the base workspace. This can be adjusted to be evaluated in the function work space, which might be of use to you when trying to evaluate peak memory usage.
The parallel profiler could also be of use to you. More details can be found in the documentation page: https://www.mathworks.com/help/parallel-computing/profiling-parallel-code.html
Hope this helps!