MATLAB Community

MATLAB, community & more

Results for: Programming

Parsing Inputs 5

Posted by Michael Katz,

Have you ever wondered how MATLAB functions make sense of variable function arguments? Many MATLAB functions take multiple optional arguments, or arguments specified as param-value pairs. A param-value pair is usually supplied with a string parameter name, such as ‘Position’ or ‘Color’ followed by the value of that parameter such... read more >>

Using Dates in MATLAB 4

Posted by Michael Katz,

Three weeks ago I wrote about MATLAB's new spreadsheet import tool. Since then I've had a few conversations regarding using dates in MATLAB; dates are common as column headers or table data. The import tool will turn Excel dates into MATLAB datenums. A datenum in MATLAB is just a double... read more >>

Function Name Case Sensitivity in MATLAB R2011b 18

Posted by Michael Katz,

I can barely remember a MATLAB version that did not produce an inexact case match warning if you used the wrong capitalization of a function name. Now, the days of willy-nilly capitalization in MATLAB are over. Starting in R2011b, that long-time warning is now an error. ... read more >>

MATLAB Toolbox Path Caching 3

Posted by Michael Katz,

One aspect of the MATLAB search path is the toolbox path cache. When your program calls a MATLAB function, the interpreter needs to know where to find the code associated with that function. Rather than scouring all the toolbox folders on your path each function call, MATLAB caches information about... read more >>

Using Tech Notes For Fun and Profit 4

Posted by Michael Katz,

I recently answered a question for a customer about dealing with out of memory errors in MATLAB. Thankfully it didn’t require me to spend a lot of effort to answer it. We already have a well-written, comprehensive answer to that question. That’s Tech Note 1106, the “Memory Management Guide.” These... read more >>

Enumeration Templates

Posted by Michael Katz,

Ever since Class Objects were first introduced in R2008a, we’ve improved or added to their functionality. In R2010b, we have official support for Enumerations. Enumerations are type-safe collections of discrete, named values. Classic textbook examples are the days of the week (Monday, Tuesday, etc) and months (January, February, etc), because... read more >>