Stuart’s MATLAB Videos

Watch and Learn

Using a List of Anonymous Functions to Implement a Set of Checks on a Data Set

I need to perform a number of checks on the values in a large table. Currently I implement the checks in code in a script. I find it can be cumbersome if I want enable or disable certain checks, as I need to comment out or use a if/then. Looking at my checks, they appear all to be of a similar structure: element-wise operations on the columns of the table. So I thought I would try to implement the checks as a list of anonymous functions stored in a spreadsheet. This way I could easily enable/disable with a column value. I get stuck for a while (between 22:35 and 31:00), where I think isempty operates element-wise on an array when it always operates on the entire array and returns a scalar. Also sound quality is reduced from there to the end. Features covered in this code-along style video include:
  • Anonymous functions
  • regexp, cellfun
Video Player is loading.
Current Time 0:00
Duration 40:29
Loaded: 0.00%
Stream Type LIVE
Remaining Time 40:29
 
1x
  • Chapters
  • descriptions off, selected
  • captions off, selected
  • en (Main), selected
    Play the video in full screen mode for a better viewing experience. 
    |
    • print

    Comments

    To leave a comment, please click here to sign in to your MathWorks Account or create a new one.

    Loading...
    Go to top of page