Loren on the Art of MATLAB

Turn ideas into MATLAB

Vectorized goto in MATLAB 26

Posted by Loren Shure,

Customers have long asked for a GOTO statement in MATLAB to allow them to use programming constructs familiar to them from other languages they already know. I am pleased to announce that a proposal is making its way through the design process at MathWorks and I thought I'd use... read more >>

Understanding Persistence 6

Posted by Loren Shure,

Questions about using persistent variables arise from time to time in the MATLAB newsgroup. Today I'd like to show you a little about what you might think you can do, but can't with persistent variables. I am also curious to hear... read more >>

Making Functions Suitable for ND Arrays 12

Posted by Loren Shure,

When we changed MATLAB to handle more than just 2-dimensional arrays (MATLAB version 5), we wanted to extend existing M-files to also handle N dimensions, when sensible. We found certain ways to do that well and I plan to show a... read more >>

M-Lint Live in Editor in R2006a 15

Posted by Loren Shure,

M-Lint is a tool new in MATLAB version 7 (Release 14) to check code for possible problems and report results. You can use it from the MATLAB command line, from the Current Directory Browser, and from the MATLAB Editor. To learn more about mlint, you might find this... read more >>

Working with structs 5

Posted by Loren Shure,

MATLAB has some functions that are specifically designed for exploring the contents of structures (entities known in MATLAB by the class struct). I find the functions isfield and fieldnames particularly helpful. The reason I raise this area of functionality is because... read more >>

Scalar Expansion and More 31

Posted by Loren Shure,

Last week I received email from a blog reader asking about extending the meaning of the arithmetic operators to do more than scalar expansion, and instead extend the expansion to singleton dimensions. In this post, I discuss the evolution of scalar expansion in MATLAB, talk about possible future designs, ... read more >>

Existence in MATLAB 12

Posted by Loren Shure,

exist can be called with one argument (a string) to test if that specific name is known and available in MATLAB in any form. If we program carefully and check the output result of exist, then we can be sure we know whether we are dealing with a MATLAB... read more >>

These postings are the author's and don't necessarily represent the opinions of MathWorks.