help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding out which functions an M file requires to run


From: Oliver Heimlich
Subject: Re: Finding out which functions an M file requires to run
Date: Mon, 19 Oct 2015 18:30:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0

On 19.10.2015 17:38, Sebastian Schöps wrote:
> Octave does not support "matlab.codetools.requiredFilesAndProducts" or
> "depfun" [1,2]. However, you can use the profiler, e.g.:
> 
> profile on
> run_your_script;
> profile off
> T = profile ("info");
> for i=1:length(T.FunctionTable), 
>   path=which(T.FunctionTable(i).FunctionName);
>   % print only files in home
>   if findstr(path,"/home")
>     path
>   end
> end

You might miss some functions when the m file contains branches and does
not execute all parts of the code.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]