MATLAB Answers

How do I extract a portion of a string after a prescribed symbol?

5 views (last 30 days)
I have a string of the form
mystring='C\users\me\data\mymatrix.mat'
What operation will permit me to create the string consisting of all characters before the last '\'. In other words, what operation will yield the string
'C\users\me\data' ?
Perhaps the command strsplit could be used in some manner?

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags

Products