How can I call external functions in different paths within App Designer
Show older comments
I am constructing a GUI using APP Designer from a .m script, which calls some developed functions. My .mlapp file is in C:\GUI_files.
The problem is simplified as:
Within the main body, the main function A is called in a callback function for a button, A is in the same path with .mlapp (C:\GUI_files). Within function A, another function B is called which is in path C:\GUI_files\toolfunc, it is accessed in A by command 'addpath[C:\GUI_files\toolfunc] '. Within function B, function C is called, which is in a .p file and not readable. Function C is in path 'C:\GUI_files\toolfunc\toolfunc\tolls', which is a subfolder of B's path. Within B, the func C is accessed by command 'add path[C:\GUI_files\toolfunc\tools] '. That means the function will call another function in a different path.
It works well in the MATLAB environment, however, it shows error when I make it to a standalone Desktop APP. I assume that maybe the path changing command does not work within a packed App, because with the Compiler no folder can be chosen but only files. Because of the .p file, I cannot see the complete function, so I am not sure if the problem is it. So I want to ask, if the different paths of the called functions/ 'addpath' and 'cd' commands matter the standalone Desktop application?
Accepted Answer
More Answers (0)
Categories
Find more on Debugging and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!