Loren on the Art of MATLAB

Turn ideas into MATLAB

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Results for: Function Handles

Memoize Functions in MATLAB 2

Posted by Loren Shure,

Very early on in this blog (2006!), I wrote a post on memoizing functions, i.e., caching results so outputs that have already been calculated don't need to be calculated again (code included at the end of this post). Memoization can provide a significant performance boost especially if the function in... read more >>

No Infs, NaNs, or Bits 5

Posted by Loren Shure,

You may have heard the phrase "no ifs, ands, or buts" - meaning that there whatever the issue is, there is a definitive, non-negotiable answer or outcome. I heard it often when trying to persuade my parents to allow me to do something they didn't want me to do. Today when I heard someone use that phrase, what I sort of heard instead was "no |Inf|s, |NaN|s, or bits". So I will talk about those values and types today.... read more >>

Combining Functions 9

Posted by Loren Shure,

For a lot of calculations, it makes sense to combine operations into a single expression. You can sometimes do this easily when you have function handles and you generate one final function that you can apply. ... read more >>