Loren on the Art of MATLAB

Turn ideas into MATLAB


Loren on the Art of MATLAB has been archived and will not be updated.

Posts 1 - 10 of 26

Results for: Vectorization

Once and for All 16

I was talking to my long-time colleague, Mike Croucher, who joined MathWorks team recently (yay!). About a bunch of interesting topics, some of which could be good fodder for a blog post. Today I... read more >>

The Meaning of CCC 11

When I started thinking about a post featuring CCC, I decided to search online for it - so many different meanings! Here's a small sample:... read more >>

Importance of Implicit Expansion For Performance 6

Sometimes people state that they like using MATLAB because it's easy to express their mathematical thoughts. Sometimes there's a follow-on that they then switch to another language for performance. While early in the history of MATLAB, that was sometimes beneficial, it is not so obvious these days. Let's take the example of implicit expansion (also here).... read more >>

Which Way to Compute: cellfun or for-loop? 9

Over a long number of years, people have asked whether it's better to use cellfun or a for-loop to perform certain computations. As with so many things in life, the correct answer here is "it depends". Let me give you a bit more insight so you can make good choices.... read more >>

MATLAB arithmetic expands in R2016b 52

With pleasure, I introduce today's guest blogger, my colleague, Steve Eddins. He has been heavily involved in image processing capabilities in our tools and more recently has also contributed substantially to designing additions and improvements to the MATLAB language.... read more >>

Moving Along 6

Ever wish you could easily perform some statistical calculations with a sliding window, but find convolution and filtering a bit daunting for this application? Then a set of new functions in Release R2016a might just be for you! ... read more >>

Finding the Closest Value Less than a Threshold 15

I just got asked a question about a good way to find the closest value in a vector that was less than a threshold. My solution is fairly short, and demonstrates some of my favorite MATLAB techniques. I will compare also show you an "obvious" solution.... read more >>

The Winter of Our Vectorization 3

ContentsGoing the Whole 9 FeetEnter MATLABTime for Some Logical IndexingConvoluted, Yet SimplerFun with arrayfunPutting it All TogetherSpring into Action!Today I'd like to introduce guest blogger... read more >>

MATLAB Behavior: for 34

Conventional wisdom for programming MATLAB used to be that using for loops automatically forced a program to suffer from poor performance. Since MATLAB R13 (version 6.5), MATLAB has... read more >>

Coordinating Zero Removals from Multiple Arrays 13

I've fielded some questions recently about how to coordinate multiple arrays changing simultaneously. One example is removing elements for two arrays in the case where either... read more >>

Posts 1 - 10 of 26