{"id":2686,"date":"2016-10-13T12:43:37","date_gmt":"2016-10-13T17:43:37","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/?p=2686"},"modified":"2017-04-26T16:02:51","modified_gmt":"2017-04-26T21:02:51","slug":"constructing-a-list-of-filenames-using-the-new-string-handling-features-in-release-2016b","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2016\/10\/13\/constructing-a-list-of-filenames-using-the-new-string-handling-features-in-release-2016b\/","title":{"rendered":"Constructing a List of Filenames Using the New String Handling Features in Release 2016b"},"content":{"rendered":"<p>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.<\/p>\n<p>To do this, I try out the new string handling features in Release 2016b for the first time, learning as I go.<\/p>\n<p>Features used in this\u00a0<a href=\"https:\/\/blogs.mathworks.com\/videos\/2015\/10\/29\/matlab-code-along-videos\/\">code-along<\/a>\u00a0style video include:<\/p>\n<ul>\n<li><tt>table<\/tt> and <tt>readtable<\/tt> with\u00a0<tt>'TextType'<\/tt> ,<tt>'string'<\/tt><\/li>\n<li><tt>string<\/tt> , <tt>strings<\/tt> , <tt>erase<\/tt> , <tt>contains<\/tt> , \u00a0scalar and array concatenation with <tt>+<\/tt> and <tt>regexp<\/tt><\/li>\n<li><tt>arrayfun<\/tt> and <tt>cellfun<\/tt><\/li>\n<li>&#8230;and no <tt>for<\/tt> loops!<\/li>\n<\/ul>\n<p>Follow me on Twitter (<a href=\"https:\/\/twitter.com\/stuartmcgarrity\">@stuartmcgarrity<\/a>) if you want to be notified when I post.<\/p>\n<p><div class=\"row\"><div class=\"col-xs-12 containing-block\"><div class=\"bc-outer-container add_margin_20\"><videoplayer><div class=\"video-js-container\"><video data-video-id=\"5298995856001\" data-video-category=\"blog\" data-autostart=\"false\" data-account=\"62009828001\" data-omniture-account=\"mathwgbl\" data-player=\"rJ9XCz2Sx\" data-embed=\"default\" id=\"mathworks-brightcove-player\" class=\"video-js\" controls><\/video><script src=\"\/\/players.brightcove.net\/62009828001\/rJ9XCz2Sx_default\/index.min.js\"><\/script><script>if (typeof(playerLoaded) === 'undefined') {var playerLoaded = false;}(function isVideojsDefined() {if (typeof(videojs) !== 'undefined') {videojs(\"mathworks-brightcove-player\").on('loadedmetadata', function() {playerLoaded = true;});} else {setTimeout(isVideojsDefined, 10);}})();<\/script><\/div><\/videoplayer><\/div><\/div><\/div><\/p>\n<p>Play the video in full screen mode for a better viewing experience.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2016\/10\/13\/constructing-a-list-of-filenames-using-the-new-string-handling-features-in-release-2016b\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/d5044a6a-e740-47ce-af09-5ac8e70ea58e\/eb6b37fb-b8e6-4b29-a8f7-948bd49ed1d0\/160x90\/match\/image.jpg\" onError=\"this.style.display ='none';\"\/><\/p>\n<div class=\"overlay_container\">\n      <span class=\"icon-video icon_color_null\"><time class=\"video_length\">70:01<\/time><\/span>\n      <\/div>\n<p>      <\/a><\/div>\n<p>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&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2016\/10\/13\/constructing-a-list-of-filenames-using-the-new-string-handling-features-in-release-2016b\/\">read more >><\/a><\/p>\n","protected":false},"author":133,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[27,4],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/2686"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/users\/133"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/comments?post=2686"}],"version-history":[{"count":9,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/2686\/revisions"}],"predecessor-version":[{"id":2875,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/2686\/revisions\/2875"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=2686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=2686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=2686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}