Loren on the Art of MATLAB

Turn ideas into MATLAB

Note

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

Posts 21 - 29 of 29

Results for: Efficiency

Evolution of the Function isfield 10

Today I want to talk a bit about the function isfield and some of the history of its implementation. isfield has been built into MATLAB for a few releases now. We felt it was important... read more >>

Trying to Match Behavior of a New Function to an Existing One 11

We might want to a write a function that mimics the behavior of another related function, specifically with respect to input shapes, etc. Ideally, we'd like to write it so we... read more >>

Structures and Comma-Separated Lists 51

I have seen an increasing number of questions on structures and extracting information from them in a vectorized way. Though I've already covered portions of this topic in... read more >>

Fibonacci and filter 16

Over the years, people have posted many versions of code for calculating Fibonacci numbers. I thought I'd collect a few of the ideas here and start a discussion on the merits... read more >>

High Performance File I/O 6

Today I'd like to tell you how you might improve the performance of reading and writing files using MATLAB's low-level file i/o functions. The key here is to disable the automated buffer... read more >>

More on expansion: arrayfun 11

Since there seems to be so much interest in the topic of going beyond scalar expansion, it seems worth talking about yet some other ways to achieve the same goals. I am very appreciative of the... read more >>

Scalar Expansion and More 31

pre.codeinput { background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200); } @media print { pre.codeinput {word-wrap:break-word; width:100%;} } span.keyword... read more >>

Use nested functions to memoize costly functions 27

Some languages provide ways to store results of costly calculations so if the calculation had been performed before, it need not be repeated when requested later. There is a way to accomplish this... read more >>

Existence in MATLAB 12

Users have needed access to information about the existence of variables, files, etc. in MATLAB for a long time. The function exist allows us to programmatically check for these entities. exist... read more >>

Posts 21 - 29 of 29