Stuart’s MATLAB Videos

Watch and Learn

Constructing a List of Filenames Using the New String Handling Features in Release 2016b

Posted by Stuart McGarrity,

I have a spreadsheet with a list of filenames in one column whose absolute location is defined relative to a file in another column. I want to be able to construct the absolute path for all of them so I can compare them with another list of absolute path filenames.

To do this, I try out the new string handling features in Release 2016b for the first time, learning as I go.

Features used in this code-along style video include:

  • table and readtable with 'TextType' ,'string'
  • string , strings , erase , contains ,  scalar and array concatenation with + and regexp
  • arrayfun and cellfun
  • …and no for loops!

Follow me on Twitter (@stuartmcgarrity) if you want to be notified when I post.

Play the video in full screen mode for a better viewing experience.

3 views (last 30 days)  | |

Comments

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