complied standalone app failed to include toolbox functions

조회 수: 2 (최근 30일)
xi
xi 2018년 1월 25일
답변: Greg 2018년 1월 25일
I made a gui, running perfectly in matlab enviorment v2017a. Then I complied it into a standalone application. But it failed to work at some point. I was able to track the failure, which occurred when I call functions in the toolbox/bioinfo/bioinfo/ Then I tried to included them in the "files required for your application to run". This seems to be helpful and passed some functions, but failure occurred at again, at a later position when a specific function was called: toolbox/bioinfo/bioinfo/multialign.m. My guess is that, this function calls some other toolbox functions not included.
I assume that, the toolbox functions should be all included in the runtime library. Am I wrong?
  댓글 수: 2
Adam
Adam 2018년 1월 25일
편집: Adam 2018년 1월 25일
So long as the dependency checker can work out that these functions are being called then yes they should be. If they are being called via some string-based method, e.g. str2func, then the dependency checker will not find them as dependencies though and you would need to add the top-level function you are calling yourself (it should add all its dependencies).
xi
xi 2018년 1월 25일
Thanks so much Adam! Your answer helps me to find out the problem. This specific function has parameters that are names strings of functions, which were not recognized as dependencies: multialign(P,tree,'ScoringMatrix',{'pam150','pam200','pam250'}); After including the functions pam150(), pam200(),pam250(), it works.
Thanks!

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

답변 (1개)

Greg
Greg 2018년 1월 25일
Use the %#function pragma to help the dependency checker find those str2func-type files.
See documentation here for all the specifics on using %#function.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by