Guides

by

Below is code demonstrating how to typeset matrices in LaTeX using the array environment. \begin{displaymath} Q = \left( \begin{array}{ccc} q_{11} & q_{12} & q_{13} \\ q_{21} & q_{22} & q_{23} \\ q_{31} & q_{32} & q_{33} \\ \end{array} \right) \end{displaymath} The code generates a three column matrix with the contents of each column centered ({ccc}).

by

Interrupts are exactly what they sound like. They are events that cause a microcontroller’s CPU to stop executing a main program in order to execute a snippet of code on the side. As an example, here I discuss how the analog comparator on the ATmega328 (Arduino Uno) can be configured to generate an interrupt. Let

by

On one warm spring afternoon during grad school when I should have been outside enjoying nature, I stayed in the lab and wrote the following MATLAB script. It will take any 8-bit RGB image and convert it to colored HTML text; any text. As an example of its application I have emblazoned my favorite positronic

by

For a recent project one of my research students needed to generate exponentially distributed random numbers in MATLAB. The Statistics Toolbox has a built-in function to do this, but I don’t have a license for this toolbox. Below is the code we wrote. It performs a log transformation to convert a uniformly distributed random number