Matlab Substring as function call? <p>I am trying to figure out this substring feature and whether there exists a function call for it or not. As far as I can find, <a href="http://stackoverflow.com/questions/16126847/how-do-i-get-substring-to-work-in-matlab">here</a> and <a href="http://stackoverflow.com/questions/20366333/extract-substring-from-the-last-position-in-matlab">here</a> along with various other places, there simply is no related function for this since strings are char arrays, and so they settled for only implementing the indexing feature.</p> <p>MWE:</p> <pre><code>fileID = fopen('tryMe.env'); outDate = fgetl(fileID); </code></pre> <p>Where the file <code>'tryMe.env'</code> only consists of 1 line like so:</p> <pre><code>2014/9/4 </code></pre> <p>My wanted result is:</p> <pre><code>outDate = '14/9/4' </code></pre> <p>I am trying to find a clean, smooth one liner to go with the variable definition of <code>outDate</code>, something along the lines of <code>outDate = fgetl(fileID)(3:end);</code>, and not several lines of code.</p> <p>Thank you for your time!</p>