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: Common Errors

What’s “if” “all” about? 12

Posted by Loren Shure,

I recently posted about a GOTCHA with the expression a < x < b in MATLAB and Matt's comments made me look to see if I had ever devoted a post to the behavior of all (or its companion any). So today I will explain how all works and why you need to take care when you use arrays for testing conditions in if and while statements. This is especially true if you do not use them with functions such as any or all since they can reduce expressions to scalar true and false values.... read more >>

Scalar Roulette 4

Posted by Loren Shure,

A while ago, Steve posted an article entitled Functional Design Clunkers on his blog. Well, I have a confession to make too. Have you ever been bitten by the ambiguity in the contour function? ... read more >>