My favorite obscure and/or tricky MATLAB stuff:
- Beware of negative zero!
- Super efficient N-D Cartesian product.
- Dynamic legend.
colonoperator can be passed as a character!
colonis smarter than you. The second syntax
j:i:kdoes not necessarily create an array that goes to
k; it automatically goes to
m = fix((k-j)/i);.
sprintfc: print into a cell array.
forloop expression (
for var = expr ...) can be a matrix, looping through columns.
- Most operators have named functional forms.
- Set membership tests for sorted arrays:
ismembc2, and more.
- You can make a
DllMainfor a MEX file to implement attach/detach instructions, and
mexAtExitfor module unload ops.
- How does dynamic array resizing/growth (possibly) work?
- Where does
handlesstructure (and other GUI data tricks)?.
- Changing the order of line series colors (
ColorOrder), and the "best" colors.
- What does MATLAB do internally when you truncate an array with
- Why don't they add 0 based indexing to MATLAB (according to Cleve Moler)?
- Apparently MathWorks did not expect anyone to actually overload curly braces (
accumarrayrocks, but you have to use it right.
- The default C MEX configuration uses ANSI C, which really stinks. Enable C99.
bsxfuncan replicate in multiple dimensions.
kronto replicate either array elements or whole arrays.
I'm a research scientist focused on medical image processing, machine learning, dimensionality reduction, and parallel computing. I ♥
Q&A for professional and enthusiast programmers
Q&A for meta-discussion of the Stack Exchange family of Q&A websites
Q&A for computer enthusiasts and power users
Q&A for enthusiasts and power users of the Android operating system
Q&A for professional programmers interested in conceptual questions about software development
Q&A for science fiction and fantasy enthusiasts
Q&A for scientific skepticism
Q&A for Information security professionals
Q&A for Ubuntu users and developers
Q&A for professional system and network administrators
Q&A for users of TeX, LaTeX, ConTeXt, and related typesetting systems
Q&A for people studying math at any level and professionals in related fields
Q&A for researchers, developers, and users of Tor
Q&A for peer programmer code reviews
Q&A for movie and tv enthusiasts