Troubleshooting custom files solution

조회 수: 3 (최근 30일)
Ally Wesner
Ally Wesner 2020년 6월 3일
답변: Divyam 2025년 6월 12일
Suppose a user receives an error when attempting to use "pdf" function from the Statistics and Machine Learning Toolbox. However, you do not receive the same error when using this function with the same input arguments. What single line of code will help you determine if the user has his/her own "pdf" function?
  댓글 수: 3
Ally Wesner
Ally Wesner 2020년 6월 4일
What would be the exact command for checking the pdf function using "which"?
Chi
Chi 2022년 6월 14일
편집: Chi 2022년 6월 15일
Acceptable answer at the time of this post would be "which pdf -all". It would display path to all pdf functions on the search path and therefore it help to check if user has his/her own pdf function. See documentation on which ___ -all for more information.

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

답변 (1개)

Divyam
Divyam 2025년 6월 12일
As mentioned in the comments above, you need to execute the command below to display the path to all the pdf functions on the search path of your MATLAB installation.
which pdf -all
To figure out which search path is referencing your custom pdf, you need to parse the locations listed after the execution of the above command and check that the top result should not be the path to a built-in MATLAB function. The path should point to a MATLAB workspace or any other location on your system's home directory that is not a part of the MATLAB installation directory.
/home/user/matlab/pdf.m % custom function
matlab/toolbox/stats/.../pdf.m % built-in function
For more information regarding the "which" function, refer to the following documentation: https://www.mathworks.com/help/matlab/ref/which.html

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by