memoize
- :
mf =memoize(fcn)¶ Return a memoized version of the function handle fcn.
Calls through mf are cached by the values and classes of their input arguments (and the number of requested outputs), so a repeated call returns the stored result instead of evaluating fcn again. Memoizing the same function twice gives access to the same cache. Use
stats (mf)to inspect the cache,clearCache (mf)to empty it and the propertiesEnabledandCacheSizeto control it.