{"id":418,"date":"2010-02-23T14:40:42","date_gmt":"2010-02-23T14:40:42","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2010\/02\/23\/basics-making-a-vector-the-matlab-way\/"},"modified":"2010-02-23T14:40:42","modified_gmt":"2010-02-23T14:40:42","slug":"basics-making-a-vector-the-matlab-way","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2010\/02\/23\/basics-making-a-vector-the-matlab-way\/","title":{"rendered":"Basics: Making a vector the MATLAB way"},"content":{"rendered":"I recently received an email asking me a question about how to create an array that is composed of different outputs from functions.\r\n\r\nThe user was new to MATLAB, but had a background in programming other languages.  This was evident in his code, which used the scalar approach required of languages like C.  In this video, I show how we can use vector indexing in MATLAB to express his code in a much more natural way.\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=\"3877437053001\" 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","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2010\/02\/23\/basics-making-a-vector-the-matlab-way\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/ea7e147a-20b1-4328-81b7-8153f250d4e6\/f92e2b04-c53a-4472-af1a-1a2e21ef7fed\/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\">2:30<\/time><\/span>\n      <\/div>\n      <\/a><\/div><p>I recently received an email asking me a question about how to create an array that is composed of different outputs from functions.\r\n\r\nThe user was new to MATLAB, but had a background in programming&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2010\/02\/23\/basics-making-a-vector-the-matlab-way\/\">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\/418"}],"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=418"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/418\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}