Doug's MATLAB Video Tutorials
January 25th, 2013
Indexing to make an image in MATLAB
I got a quick question today on how to make a diamond appear on an image in MATLAB. This is really an exercise in indexing and for loops in MATLAB. Let’s see how you can make an image in MATLAB.
January 17th, 2013
Example: Speed up MATLAB code by profiling
Sometimes the performance of MATLAB code can depend greatly on the algorithm or the specific functions called. In this example, we show how we use the profiler (and good knowledge of logical indexing in MATLAB) to speed up some MATLAB code by nearly a factor of ten.
January 9th, 2013
Visualizing random walk data (3/3)
Continuing with the random walk data: We will be bootstrap sampling the prior data to get estimates of what the next series of samples could look like.
January 3rd, 2013
Visualizing random walk data (2/3)
This week we do a code review of some random walk data, making a heatmap with adjoining histograms to better understand the distribution of data. It shows the implementation of visualizations discussed earlier.
December 26th, 2012
Visualizing random walk data (1/3)
In this video we start with some data from a random process. Each piece of data represents a small time period and change in value. Think of it as something like a stock ticker, very noisy with a larger trend upward. From the patterns in this random data we can visualize it and try to predict what that phenomenon might do in the future. We will get a range of realistic futures and a sense of what the average looks like.
Polynomial fitting is problematic, so instead bootstraping of data will be tried. This week show the results, and the next two weeks show how it was done.
December 19th, 2012
Dynamically created colormaps
In the last video we interactively changed the colormap so that there was a clear break between negative, positive and NaN values. In this video, we change the range of data, so the colormap needs to change also. Some simple code is reviewed that accomplishes this.
December 12th, 2012
Modifying a colormap interactively
I was doing a visualization and needed to change to a custom colormap to get a better understanding of the data. This video shows how to interactively modify a colormap such that NaN values take on one color, and there is a sharp division of color between negative and positive numbers.
December 7th, 2012
Review of changes made to a file reader
The changes that were suggested last week have been implemented. This shows how some small changes can really improve your code, making it more maintainable and expandable. It is good to be able to rapidly prototype in MATLAB, then once you have working code, refine it to be able to be useful for a longer time.
November 28th, 2012
Code review of a file reader: suggestion of changes
A close friend of mine is just learning MATLAB. She needs to process a bunch of text files, and was able to write some code that will accomplish that. She came to me looking to bring her code to the next level to improve maintainability, readability and flexibility. There are quite a few tweaks here that bring her code to the next level. Most of these are very common, so you can get some ideas to apply to your code also.
November 19th, 2012
Using keyboard shortcuts
I like it when I find new productivity tips in the MATLAB environment. The new MATLAB Toolstrip shows keyboard shortcuts for all toolstrip items when you press the Alt-key, which reminded me that we introduced customizable keyboard shortcuts a few years ago.
This video shows how you can customize these keyboard shortcuts. I add ones for clearing the workspace and saving all files.
These postings are the author's and don't necessarily represent the opinions of MathWorks.