Info

この質問は閉じられています。 編集または回答するには再度開いてください。

File paths of all function calls within an m script? (and all m scripts that call it?)

1 回表示 (過去 30 日間)
Darin McCoy
Darin McCoy 2011 年 10 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi,
I'm trying to optimize the load time for a GUI i built that calls several matlab functions and several custom functions that i've created. I would like to use Matlab Compiler to build an EXE out of this.....but the load time is too slow (because i am loading libraries that i dont directly use in the program)
I think i can get a faster load time if i only add the paths for just the functions i need (and the functions that they call)...its basically like using a "which" on all functions (and nested functions)) for an m file. Has anybody done that?

回答 (2 件)

Fangjun Jiang
Fangjun Jiang 2011 年 10 月 5 日
Will the code dependency report be helpful to you? In the M-editor, click Tools->Show dependency report
  2 件のコメント
Darin McCoy
Darin McCoy 2011 年 10 月 5 日
It's close! (Not quite what i need....)
It doesn't give you the filepaths of each function - and it doesnt get all the functions (it only gets a couple of them)
Fangjun Jiang
Fangjun Jiang 2011 年 10 月 5 日
check these functions
depdir()
depfun()
ckdepfun()

Walter Roberson
Walter Roberson 2011 年 10 月 5 日
The compiler effectively already does this for all .m code that it can figure out is called somewhere. (It cannot always figure out what is being called if the routine names appear as strings such as in feval() or eval() or as quoted strings in callbacks.)
MCR, is a different matter. My understanding is that it is possible to create semi-customized versions of MCR, but you have no hope of doing it "manually" is it depends entirely on what internal routines are called. (And, of course, I can't locate the documentation I was thinking of, and at the moment what I can find does not appear to allow the possibility at all. I might have dreamed it...)

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by