Category Archives: Scientific Computing
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 [...]
Create a symmetric matrix in Mathematica