FAQ: Difference between revisions
Jump to navigation
Jump to search
Line 589: | Line 589: | ||
However, | However, | ||
if ([] | if ([]) | ||
is not the same as | |||
if (all ([])) | |||
because, despite the name, the <tt>all</tt> is really returning true if none of the elements of the matrix are zero, and since there are no elements, well, none of them are zero. This is an example of [http://en.wikipedia.org/wiki/Vacuous_truth vacuous truth]. But, somewhere along the line, someone decided that <tt>if ([])</tt> should be false. Mathworks probably thought it just looks wrong to have <tt>[]</tt> be true in this context even if you can use logical gymnastics to convince yourself that "all" the elements of an empty matrix are nonzero. Octave however duplicates this behavior for if statements containing empty matrices. | |||
===Solvers for singular, under- and over-determined matrices=== | ===Solvers for singular, under- and over-determined matrices=== |