# Finding the Closest Value Less than a Threshold15

Posted by Loren Shure,

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 Vectorization3

Posted by Loren Shure,

Today I'd like to introduce guest blogger Matt Tearle who works on our MATLAB Product Training materials here at MathWorks. Matt is on a mission to teach the world MATLAB, but this winter is testing his resolve. Annoyed that 22" of snow forced him to reschedule a training, today he... read more >>

# MATLAB Behavior: for34

Posted by Loren Shure,

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 taken advantage of some innovations that accelerate many for loops so the code has... read more >>

# Coordinating Zero Removals from Multiple Arrays13

Posted by Loren Shure,

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 array holds a zero for the location. This is a good opportunity to reiterate ... read more >>

# Calculus with Empty Arrays25

Posted by Loren Shure,

MATLAB has had empty arrays since before I started using the program. When I started, the only size empty array was 0x0. When version 5 was released, empty arrays came along for the N-dimensional ride and got more shapely. ... read more >>

# A Brief History of polyval4

Posted by Loren Shure,

When I first started working at MathWorks, there were already a few functions in MATLAB for working with polynomials. One of these, polyval, for polynomial evaluation, used one algorithm, based on Horner's rule, known for its efficiency, especially suitable for embedded... read more >>

# More Ways to Find Matching Data55

Posted by Loren Shure,

Today on the newsgroup, a user wanted help finding when values in a matrix matched some other values (see the post). There was already a solution posted when I was reading, but something about this problem kept nagging at me. So I've invested ... read more >>

# Vectorizing the Notion of Colon (:)14

Posted by Loren Shure,

The other day, one of my MathWorks buddies, Peter, asked me if I knew any tricks for vectorizing the notion of the colon (:) operator. For me, this sort of inquiry sometimes has an effect similar to waving a flag in front of a bull! The challenge was on. ... read more >>

# Speeding Up MATLAB Applications26

Posted by Loren Shure,

Today I’d like to introduce a guest blogger, Sarah Wait Zaranek, who is an application engineer here at The MathWorks. Today she talks about speeding up code from a customer to get acceptable performance. ... read more >>

# Structure Initialization50

Posted by Loren Shure,

This post continues in the theme of other recent ones, questions frequently posed to me (and probably others). It has to do with initializing structures. There is a healthy set of posts on the MATLAB newsgroup devoted to this topic.... read more >>

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