{"id":516,"date":"2011-07-20T17:39:01","date_gmt":"2011-07-20T17:39:01","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2011\/07\/20\/starting-in-matlab-functions-of-variable-numbers-of-inputs-and-outputs\/"},"modified":"2012-03-28T15:06:57","modified_gmt":"2012-03-28T20:06:57","slug":"starting-in-matlab-functions-of-variable-numbers-of-inputs-and-outputs","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2011\/07\/20\/starting-in-matlab-functions-of-variable-numbers-of-inputs-and-outputs\/","title":{"rendered":"Managing code in MATLAB: Functions of variable numbers of inputs and outputs"},"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\n\r\nThis video will allow you to do input parsing so that you have the ability to overload functions, meaning allow them to react differently to different inputs.\r\n\r\n<p>\r\n\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=\"3877437008001\" 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>","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2011\/07\/20\/starting-in-matlab-functions-of-variable-numbers-of-inputs-and-outputs\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/a2cbf552-0103-4126-b77e-3d6d66fed43f\/3ec749a2-969e-43a3-8dc3-64db8df1db68\/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\">4:05<\/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\/07\/20\/starting-in-matlab-functions-of-variable-numbers-of-inputs-and-outputs\/\">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\/516"}],"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=516"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/516\/revisions"}],"predecessor-version":[{"id":678,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/516\/revisions\/678"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}