已回答 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| ...
已回答 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_...