Doug's MATLAB Video Tutorials

Results for: Level: Basic

Simplify, simplify, simplify 1

Posted by Doug Hull,

Simplify, simplify, simplify I often say that one my greatest qualifications for troubleshooting MATLAB code is that I know I am not that clever, so I have to simplify things until I can understand them easily. It works really well when debugging MATLAB code. Use simpler data: Instead of... read more >>

Using Datetick with Plotyy in MATLAB 2

Posted by Doug Hull,

Using Datetick with Plotyy in MATLAB Recently, I needed to plot two different sets of time series data on the same axes, but they were at different scales. In this simplified example, I show how you can change the x-labels to display the month name. This requires you capture the handles of the axes created... read more >>

Exploring data through a series of vizualizations 1

Posted by Doug Hull,

Exploring data through a series of vizualizations When we get unknown data, we do not always know where it will lead us. This video shows the series of visualizations that I went through to answer a question about my data. By showing the process, we can see there there are lots of reality checks on... read more >>

Searching for permutations of a string in a list in MATLAB 4

Posted by Doug Hull,

Searching for permutations of a string in a list in MATLAB In this video a colleague was looking in a large list to see if each element was a permutation of any element of a shorter list. I name these lists Haystack and Needle so it is easy to remember which I am looking for and which I am looking... read more >>

Non-uniform spacing for surf in MATLAB

Posted by Doug Hull,

Non-uniform spacing for surf in MATLAB In this video, we will use non-uniform spacing for the X vector going into a surf plot in MATLAB. This allows us to selectively increase the resolution of a graphic in the more important regions. This could be useful if the calculations are computationally expensive. This is... read more >>

Understand If statement behavior on vectors 2

Posted by Doug Hull,

Understand If statement behavior on vectors In teaching new MATLAB users, I often see them accidentally use a vector as an input to an if statement. This is not likely what they intend and it is often an overlooked syntax error. In this video, I show the error as it is often coded and... read more >>

Refactor code to rename variable with with MATLAB editor 1

Posted by Doug Hull,

Refactor code to rename variable with with MATLAB editor As code matures, very often the nature of variables becomes better understood and the names of the variables need to change to reflect that better understanding. This short video shows how the MATLAB editor can quickly rename a variable throughout your code. ... read more >>

Hide implementation in functions 1

Posted by Doug Hull,

Hide implementation in functions I am working on a large scale project that involves many broad topics like loading data, and visualizing. Both of these are important, but I needed to work on the visualizing immediately. I knew I would be passing around a large dataset into lots of different functions. ... read more >>

Breaking down a custom visualization in MATLAB

Posted by Doug Hull,

Breaking down a custom visualization in MATLAB Custom visualizations in MATLAB can be made to show your data however you think best. Today’s visualization looks like it might be difficult, but it was actually done with one strategic sub-function called many times. Looking at a visualization, or code in general, and seeing what pieces can... read more >>

Catch errors early with simple visualizations

Posted by Doug Hull,

Catch errors early with simple visualizations The sooner you find an error, the less expensive it is to find and fix. In MATLAB it is really easy to do quick visualizations of your data. When it is this easy, you should be doing these little reality check tests frequently. In this video, we show... read more >>

These postings are the author's and don't necessarily represent the opinions of MathWorks.