How do I specify an absolute pathname for a function when using STR2FUNC to capture its handle?
이전 댓글 표시
I want to create and use function handles for some of the functions that I have created. These functions are present in several folders and I don't want to add these folders to the MATLAB path. Rather, I wish to use STR2FUNC to capture the handle of the function by specifying its absolute path as follows:
hf = str2func('C:\mFiles\ProjectA1\foo.m');
Although STR2FUNC does create a handle, it does not correctly reference the function and does not evaluate anything.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Search Path에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!