Tag Archives: matlab

Function call counting in Matlab

Here’s a neat way to keep track of the cost, i.e. number of function calls in Matlab: rather than using a counter variable and increment it each time a function is called, use the internal Matlab counters, accessible through the FunctionTable struct array. The loop below is necessary only to get the index of the [...]
Posted in Scientific Computing, Tips & Tricks | Tagged | Leave a comment