Two functions with the same name - how to directly call one of both

I use the image processing toolbox and another toolbox that both have the function watershed. Is there a way to explicitly call one of them with both having on the search path?

 채택된 답변

Laura Proctor
Laura Proctor 2011년 3월 14일

0 개 추천

To address a name conflict, try one of the following:
  • Change the current folder.
  • Move or remove folders on the search path.
  • Rename or move files.
  • Specify the full path or partial path to the file that you want.

댓글 수: 1

Specifying the full or partial path of a function is not possible, afaik. But you can create a function handle in addtion: CD to the wanted file once, create the function handle by: myWaterShed = @watershed, and move this afterwards directly or as first input of FEVAL.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Jokin Ezenarro
Jokin Ezenarro 2021년 8월 6일

1 개 추천

I think the easiest way is to change the preferences of the pathways. In Home go to Set Path, choose the path of the function you want to use and is shadowed and take it to the top.
Anon
Anon 2011년 3월 15일

0 개 추천

Thanks for your replies, Laura and Jan. It helped.

카테고리

도움말 센터File Exchange에서 Function Creation에 대해 자세히 알아보기

태그

질문:

2011년 3월 14일

답변:

2021년 8월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by