GUI using functions from another m.file
2 views (last 30 days)
Show older comments
Dmitry Devjatykh
on 24 Nov 2015
Answered: Walter Roberson
on 24 Nov 2015
Hello. I am beginning to study GUI building basics. Here is what I want to do. There is file with specific format, it can be read with specific function that is stored in .m file. I do not want include code of that function in my guy.m file. Is it possible to connect, link or include gui and various m.files? Do they just have to be put into one folder and after complitating is complete exe. file will be able to use function from m.file?
0 Comments
Accepted Answer
Walter Roberson
on 24 Nov 2015
You can have difficulty if you have a call to a function and that call is hidden inside a string, such as if you were to use
ode45('SomeFunctionName',....)
If you have calls like that then you may need to use a %#function pragma to tell MATLAB to include the function.
If your calls to the function are "obvious", then as long as the file with that name is on your MATLAB path, the MATLAB Compiler will be able to find it and will include it when building the .exe
0 Comments
More Answers (0)
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!