{"id":501,"date":"2011-06-13T19:46:23","date_gmt":"2011-06-13T19:46:23","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2011\/06\/13\/managing-code-in-matlab-scripts\/"},"modified":"2015-06-24T08:48:36","modified_gmt":"2015-06-24T13:48:36","slug":"managing-code-in-matlab-scripts","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2011\/06\/13\/managing-code-in-matlab-scripts\/","title":{"rendered":"Managing code in MATLAB: Scripts"},"content":{"rendered":"This is the first series of MATLAB video tutorials that are an attempt to systematically make videos for a \u201ctechnology trees\u201d for using MATLAB. This first tree covers the various kinds of MATLAB files you might write. The tree shows you the order you should watch them because some rely on skills you need to learn from earlier videos, but some do not.\r\n<p>\r\n<div style=\"text-align:center; width:640px; margin-left:auto; margin-right:auto;\">\r\n<img id=\"Image-Maps_3201104211133568\" src='https:\/\/blogs.mathworks.com\/videos\/..\/images\/videos\/2011\/04\/tech-tree.jpg'  usemap=\"#Image-Maps_3201104211133568\" border=\"0\" width=\"640\" height=\"400\" alt=\"\" \/>\r\n<map id=\"_Image-Maps_3201104211133568\" name=\"Image-Maps_3201104211133568\">\r\n<area shape=\"rect\" coords=\"276,17,358,67\"     href=\"https:\/\/blogs.mathworks.com\/videos\/?p=501\" alt=\"Script\" title=\"Script\"    \/>\r\n<area shape=\"rect\" coords=\"277,96,359,146\"   href=\"https:\/\/blogs.mathworks.com\/videos\/?p=505\" alt=\"Function\" title=\"Function\"    \/>\r\n<area shape=\"rect\" coords=\"279,177,361,227\" href=\"https:\/\/blogs.mathworks.com\/videos\/?p=508\" alt=\"1in1out\" title=\"1in1out\"    \/>\r\n<area shape=\"rect\" coords=\"273,260,355,310\" href=\"https:\/\/blogs.mathworks.com\/videos\/?p=509\" alt=\"MinNout\" title=\"MinNout\"    \/>\r\n<area shape=\"rect\" coords=\"278,341,360,391\" href=\"https:\/\/blogs.mathworks.com\/videos\/?p=516\" alt=\"VarArg\" title=\"VarArg\"    \/>\r\n<area shape=\"rect\" coords=\"475,69,557,119\"   href=\"https:\/\/blogs.mathworks.com\/videos\/?p=512\" alt=\"Cell mode\" title=\"Cell mode\"    \/>\r\n<area shape=\"rect\" coords=\"409,153,491,203\" href=\"https:\/\/blogs.mathworks.com\/videos\/?p=513\" alt=\"Markup\" title=\"Markup\"    \/>\r\n<area shape=\"rect\" coords=\"540,152,622,202\" href=\"https:\/\/blogs.mathworks.com\/videos\/2011\/08\/19\/starting-in-matlab-cell-mode-interactive\/\" alt=\"Interactive\" title=\"Interactive\"    \/>\r\n<area shape=\"rect\" coords=\"20,178,102,228\"   href=\"https:\/\/blogs.mathworks.com\/videos\/?p=507\" alt=\"Driver script\" title=\"Driver script\"    \/>\r\n<area shape=\"rect\" coords=\"148,179,230,229\" href=\"https:\/\/blogs.mathworks.com\/videos\/?p=510\" alt=\"Sub function\" title=\"Sub function\"    \/>\r\n<area shape=\"rect\" coords=\"148,254,230,304\" href=\"https:\/\/blogs.mathworks.com\/videos\/?p=511\" alt=\"Nested\" title=\"Nested\"    \/>\r\n<\/map>\r\n<\/div>\r\n<p>\r\nYou can see that understanding what a script is in MATLAB is the fundamental skill needed to understand functions, subfunctions, etc&#8230;\r\n<p>\r\nThis video will show how and why you write script files in MATLAB.\r\n<p>\r\n<div><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=\"3877437018001\" 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>\r\n <\/div>\r\n<p>\r\nStuart <a href=\"https:\/\/www.mathworks.com\/videos\/writing-a-matlab-program-69023.html\">did a video<\/a> that covers this material in a similar but different way.","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2011\/06\/13\/managing-code-in-matlab-scripts\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/4dd271e1-16d2-40be-8fe3-870a2c000553\/c57d24da-7522-4eac-b199-adf76854acec\/1280x720\/match\/image.jpg\" onError=\"this.style.display ='none';\"\/>\n      <div class=\"overlay_container\">\n      <span class=\"icon-video icon_color_null\"><time class=\"video_length\">3:37<\/time><\/span>\n      <\/div>\n      <\/a><\/div><p>This is the first series of MATLAB video tutorials that are an attempt to systematically make videos for a \u201ctechnology trees\u201d for using MATLAB. This first tree covers the various kinds of MATLAB&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2011\/06\/13\/managing-code-in-matlab-scripts\/\">read more >><\/a><\/p>","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,17],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/501"}],"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\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/comments?post=501"}],"version-history":[{"count":4,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/501\/revisions"}],"predecessor-version":[{"id":1699,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/501\/revisions\/1699"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}