Stuart’s MATLAB Videos

Watch and Learn

Use strlength to Detect Zero Length Strings

You can’t use isempty to detect empty strings, as you would for character arrays. Instead you should check for strlength being equal to zero or compare with an empty character vector. See the documentation for more information.

Play the video in full screen mode for a better viewing experience. Follow @stuartmcgarrity if you want to be notified via Twitter when I post.

  • print


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