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
Play the video in full screen mode for a better viewing experience. 
|
  • print

댓글

댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.