Answered sparse( ix, jx, sx, rx, cx ) implausibly slow
Using 5 input arguments with the |sparse| command is indeed an efficient way to construct a sparse matrix. However, you most li...
Answered In my code, arrayfun slower than for loop
The |arrayfun| function simply applies a given function to each element of the array that you supply. In this sense, |arrayfun| ...
Answered apply function with two variables
You should be able to make your code significantly faster by *vectorizing* it (see <http://www.mathworks.com/help/matlab/matlab_...