Sunday, January 24, 2016

Matlab misc searches 2015

Various searches that I did while tweaking the Matlab demonstration algorithm from Tom:

A link about the matrix multiplication function in Matlab. The rule of thumb that I tried to remember about matrix multiplication is that the result is an array of the sums of multiplying each element of a row by the matching element of a column. This page also shows the syntax of how rows and columns are defined in Matlab, with columns being separated by semicolons and row elements being separated by spaceshttp://www.mathworks.com/help/matlab/ref/mtimes.html

A link about the matrix inverse function in Matlab. This page fails to reference the textbook definition of matrix inverse, but does have a couple of useful examples of using matrix inverse to solve linear equations. http://www.mathworks.com/help/matlab/ref/inv.html?refresh=true

The full tutorial on matrix indexing. The most important thing to remember is that the starting index for accessing matrixes in Matlab is 1, not 0. http://www.mathworks.com/help/matlab/math/matrix-indexing.html?refresh=true

A similar tutorial but this one is Array indexing: http://www.mathworks.com/help/matlab/learn_matlab/array-indexing.html

More on how to define matrixes: http://www.mathworks.com/help/stateflow/ug/how-to-define-vectors-and-matrices.html?refresh=true

How to do most common operations you'd want to do on matrixes, including defining, multiplying, inverting, concatinating, and printing: http://www.mathworks.com/help/matlab/learn_matlab/matrices-and-arrays.html

An answer to the question of how to format print output in Matlab, in this case how to format floating point number printing. I needed this while putting debug statements in the Matlab code, although it wasn't important for the final product: http://www.mathworks.com/matlabcentral/answers/99743-how-can-i-change-the-way-matlab-displays-the-significant-digits-of-floating-point-numbers

The matlab line continuation character (spoiler, it's weirdly an ellipsis, which is to say '...'): https://www.mathworks.com/matlabcentral/newsreader/view_thread/173340

The syntax for Matlab For Loops. TL;DR is if you have anything with a quantity, this allows you to perform an act on each item in the quantity: http://www.mathworks.com/matlabcentral/answers/31156-how-do-i-create-a-for-loop-in-matlab

The man page for one of MATLAB's most powerful function, one that gives you a matrix of all of the results of evaluating a polynomial on a matrix of inputs, POLYVAL. This is a very natural thing to use when computing least squares fits! http://www.mathworks.com/help/matlab/ref/polyval.html