me: call self in recursive way but independent of mfilename

버전 1.0.1 (1.15 KB) 작성자: raym
With argument,this funciton call the mfilename that it was located in, in an recursive way and can retrieve output.
다운로드 수: 1
업데이트 날짜: 2020/5/28

라이선스 보기

============
With argument,this funciton call the mfilename that it was located in, in an recursive way and can retrieve output.

function myFun (a,b)
...
me(1,2); % me is equal to myFun

end

===============
If no argument, this function returns a handle to mfilename.

function myFun (a,b)
...
aFun = me; % aFun is equal to myFun
aFun(1,2);

end

In this way, no matter how the function name is changed, there is no need to update recursive fucntion in the main contex.

인용 양식

raym (2024). me: call self in recursive way but independent of mfilename (https://www.mathworks.com/matlabcentral/fileexchange/76323-me-call-self-in-recursive-way-but-independent-of-mfilename), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2020a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
태그 태그 추가

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

버전 게시됨 릴리스 정보
1.0.1

--

1.0.0