Loren on the Art of MATLAB

Results for: How To

Seeking Symmetry in MATLAB 7

Posted by Loren Shure,

Sometimes I need to construct a matrix with certain symmetries. There are a bunch of tools in MATLAB that are well suited for such tasks. In today's post, I will mention the ones I use most often.... read more >>

Function is as functiontests

Posted by Loren Shure,

Today we have a post from guest blogger Andy Campbell to highlight a function-based approach for writing tests in MATLAB. We will be demonstrating how you can write simple functions that aid you in designing a physical system. This approach allows you to iterate quickly and improve your designs while protecting you from violating requirements met by earlier solutions.... read more >>

What Kind of MATLAB File is This? 15

Posted by Loren Shure,

We just had an interesting thread at MathWorks prompted by a customer request to programmatically distinguish between script and function MATLAB files. The File Browser already shows these separately. I will show some ideas we had and what we agreed was a good way to attack this.... read more >>

Using the MATLAB Unit Testing Infrastructure for Grading Assignments 8

Posted by Loren Shure,

Steven Lord, Andy Campbell, and David Hruska are members of the Quality Engineering group at MathWorks who are guest blogging today to introduce a new feature in R2013a, the MATLAB unit testing infrastructure. There are several submissions on the MATLAB Central File Exchange related to unit testing of MATLAB code. Blogger Steve Eddins wrote one highly rated example back in 2009. In release R2013a, MathWorks included in MATLAB itself a MATLAB implementation of the industry-standard xUnit testing framework.... 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 >>

Partitioning a Vector 9

Posted by Loren Shure,

Recently on the MATLAB newsgroup, there was a thread asking how to split up a vector into pieces which were each monotonically increasing by the value 1. The post got several answers which I did not read first. Here's my thinking.... read more >>

Learning to Love Regular Expressions 8

Posted by Loren Shure,

Today I’d like to introduce guest blogger Sarah Wait Zaranek who works for the MATLAB Marketing team here at MathWorks. Sarah previously has written about using GPUs in MATLAB. Sarah will be discussing how she got started using regular expressions.... read more >>

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