Stuart’s MATLAB Videos

Watch and Learn

Results for: Format: Video

Creating a MATLAB Function to Split a URL into Component Parts, Part 2

Posted by Stuart McGarrity,

This code-along video is the second in a series where I’m creating a MATLAB function to split a URL into component parts. Here I add more tests, return more components, and add a parameter to specify which components to return. Topics I cover in this part include: Writing tests for functions using assert Matching regular expressions... read more >>

Creating a MATLAB Function to Split a URL into Component Parts, Part 1 3

Posted by Stuart McGarrity,

I often need to break up a URL string into components such as protocol, hostname, file path, query parameters, etc. Here, I create a function to do this, similar to the fileparts function in MATLAB. Topics I cover in this code-along style video include: Writing a function Writing tests for functions using assert Matching regular expressions using regexp Using data... read more >>

Building a Matrix in a For Loop 3

Posted by Stuart McGarrity,

On an existing post, a MATLAB user asked how to vertically concatenate a number of matrices taken from MAT-files. Here is a code-along of me working through a couple of options for this. @media (min-width: 992px) { .containing-block { width: 100%; } } Play the video in full screen mode for... read more >>

Continuing a MATLAB Program That Has Crashed 4

Posted by Stuart McGarrity,

It can be frustrating when a script that has been running for a long time, perhaps for many hours, fails just before it finishes. This video shows a couple of techniques to address this issue: saving to a MAT-File and using right-click evaluate in the editor. This assumes that you have... read more >>

Saving Data from MATLAB to Excel Using a Template 2

Posted by Stuart McGarrity,

I often need to export data from MATLAB to Excel. As the files are used by others, I like to format them nicely for easy viewing and browsing. To do this, I simply create a spreadsheet with all the required formatting as a template and copy it each time. @media (min-width:... read more >>