Caching Matlab function results to file
问题 I'm writing a simulation in Matlab. I will eventually run this simulation hundreds of times. In each simulation run, there are millions of simulation cycles. In each of these cycles, I calculate a very complex function, which takes ~0.5 sec to finish. The function input is a long bit array (>1000 bits) - which is an array of 0 and 1 . I hold the bit arrays in a matrix of 0 and 1 , and for each one of them I only run the function once - as I save the result in a different array (res) and check