Troubleshooting custom files solution

3 visualizaciones (últimos 30 días)
Ally Wesner
Ally Wesner el 3 de Jun. de 2020
Respondida: Divyam el 12 de Jun. de 2025
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 comentarios
Ally Wesner
Ally Wesner el 4 de Jun. de 2020
What would be the exact command for checking the pdf function using "which"?
Chi
Chi el 14 de Jun. de 2022
Editada: Chi el 15 de Jun. de 2022
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.

Iniciar sesión para comentar.

Respuestas (1)

Divyam
Divyam el 12 de Jun. de 2025
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

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by