- MathWorks provides a good collection of MATLAB tutorials on their website. This includes links to other people's guides and their own audiovisual walkthroughs.
- I liked a linked MATLAB walkthrough from MIT. It is fairly concise and covers most of what you need to get going, except for cell arrays (which is what I really wanted to learn better). The different entries in the table of contents link to a single webpage.
- The main confusion I have with MATLAB is with the array notations. As a C programmer I have a certain way of looking at arrays, but someone brought up in the MATLAB universe doesn't even use the same vocabulary to describe things. Hence the difficulty. Here are some notes:
- : (colon) - indicates a range, typically a domain
- [] (brackets) - define a matrix or vector
- ; (semicolon) - new row for matrix defined in brackets
- () (parentheses) - indexes to a vector or matrix
- , (comma) - indexing into next dimension of a matrix
- .() (dot) - access named fields of a structure
- {} (braces) - similar to bracket and parentheses, only internal structure is preserved
- Speaking of doc and help, they both are similar to the linux command man. doc opens up the help browser, whereas help prints out information at the prompt.
- I would suggest using help and doc on a number of useful commands: path (where MATLAB looks for things, plot (make the fun graphs for which MATLAB is known), clear (disassociate a variable), and nargin (number of arguments to a function).
- The Programming Roadmap on the MathWorks site talks about advanced function features. Use help/doc on varagin, varargout, and funfun. MATLAB can even have anonymous functions using @, but I doubt the scientists and work want me using λ functions.
- Need/want to play with MATLAB but do not want to fork over private funds for a license? Try Octave!
Monday, January 3, 2011
MATLAB tutorial
Wednesday, February 10, 2010
MATLAB
Since my job as a software engineer is to take the algorithms produced from the "MATLAB guys" and turn them into something that will run on a microprocessor, I must be aware of MATLAB to some degree. I consider myself fairly skillful with computer languages, but learning MATLAB has been similar to learning Mozart. Sure there are familiar things to latch onto, but the underlying way of thinking is very different.
I never took a class which used MATLAB, but I want to pick it up with a minimal amount of painfulness. There are times in which I have to dive deeply into MATLAB hackers' code, and the more I can do on my own the better. I have a few MATLAB books in my office, but I find that online references seem to serve me better. For that reason I am adding a MATLAB section to my programming languages page.
Here are some useful links I have found when dealing with MATLAB
Now for a few random notes on things I have picked up while working in the MATLAB world.
Anything I left out? Any useful MATLAB learning tools you have to share? Please add them in the comments. I, for one, welcome our new MATLAB overlords.