Loren on the Art of MATLAB

Results for: Best Practice

Coding Best Practices – A Good Read 7

Posted by Loren Shure,

Coding Best Practices – A Good Read Coding Best Practices - A Good ReadI have written blogs before on coding best practices in MATLAB and they have always generated a lot of great feedback. I recently came across a language-neutral list of best practices for scientific computing, written by Greg Wilson of Software Carpentry.If you don't... read more >>

Timing Code 12

Posted by Loren Shure,

and Revisiting Fibonacci Festival from 2006... read more >>

Understanding Array Preallocation 6

Posted by Loren Shure,

Today I would like to introduce guest blogger Jeremy Greenwald who works in the Development group here at MathWorks. Jeremy works on the Code Analyzer and will be discussing when preallocating MATLAB arrays is useful and when it should be avoided.... read more >>

Best Practices for Programming MATLAB 56

Posted by Loren Shure,

Best Practices for Programming MATLAB  I thought I would share my top goto list of things I try to do when I write MATLAB code. And checking with other MathWorks folks whose code I admire, I found they... read more >>

Simpler Control of Random Number Generation in MATLAB 12

Posted by Loren Shure,

Simpler Control of Random Number Generation in MATLAB  Simpler Control of Random Number Generation in MATLAB Once again we're going to hear from guest blogger Peter Perkins, who is a statistical software developer here at The MathWorks. MATLAB has had random numbers since the beginning. But not... read more >>

Book Review: The Elements of MATLAB Style 7

Posted by Loren Shure,

Book Review: The Elements of MATLAB Style  I've recently been offered the opportunity to review a new book, The Elements of MATLAB Style by contributor to the FEX, Richard K. Johnson. It's a great opportunity for me to see what's important in the eyes of one particular... read more >>

Debugging Approaches 11

Posted by Loren Shure,

Debugging Approaches  There are lots of posts on the MATLAB newsgroup asking questions like why do I get this error "xxx"? One of the most common answers shows users how to track down the information ... read more >>

Doug’s “Top 10 MATLAB code practices that make me cry” 5

Posted by Loren Shure,

Doug’s “Top 10 MATLAB code practices that make me cry”  Doug's "Top 10 MATLAB code practices that make me cry" This week, Doug's blog focuses on what he considers to be some poor programming practices he's seen in MATLAB code. I agree with much of his list, including, despite the... read more >>

Ensuring Positive Values – Part 1 4

Posted by Loren Shure,

Ensuring Positive Values – Part 1  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. Depending... read more >>

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