Do you sometimes need to be sure an array has only bounded, positive values? At least one customer asked about this recently and noted that it could be quite involved. ... read more >>
Note
Loren on the Art of MATLAB has been archived and will not be updated.
Do you sometimes need to be sure an array has only bounded, positive values? At least one customer asked about this recently and noted that it could be quite involved. ... read more >>
Discrete data arise in many applications and the data may be numeric, or non-numeric, often referred to as categorical. Not all data are strictly numeric, and other... read more >>
Note. NOTE: matlabpool was removed in 2015 and you should replace that with parpool instead. Today I’d like to introduce a guest blogger, Sarah Wait... read more >>
MATLAB R2009b was recently released. My favorite new language feature is the introduction of the ~ notation to denote missing inputs in function declarations, and missing outputs in... read more >>
Recently, Steve wrote a blog discussing code clarity/obscurity in the context of one-line code solutions. Simply stated, the problem he solved is this. Find the largest value in an... read more >>
I recently posted about optional input arguments and how to override default values. Gautam mentioned wanting to allow empty inputs as defaults. Contents ... read more >>
Last week, I wrote a post on the switch statement in MATLAB. One theme in the comments was about using switch (or not!) for setting default values for input arguments that users didn't initialize. I realized that there is a nice pattern for setting these values that uses some compact, but readable code.... read more >>
Here's a question that was recently posed at MathWorks. I'm trying to invoke a function handle. It either returns 0 or 1 output arguments. If it returns an output ... read more >>
Did you know that you can use tic and toc to measure times of operations that may have other timed operations nested inside? Contents ... read more >>
Once again we're going to hear from guest blogger Peter Perkins, who is a statistical software developer here at The MathWorks. Contents ... read more >>