{"id":2028,"date":"2007-08-20T09:00:19","date_gmt":"2007-08-20T14:00:19","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2007\/08\/20\/matlab-basics-video\/"},"modified":"2016-11-17T10:43:33","modified_gmt":"2016-11-17T15:43:33","slug":"matlab-basics-video","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2007\/08\/20\/matlab-basics-video\/","title":{"rendered":"MATLAB Basics video: Storing data in a matrix from a loop"},"content":{"rendered":"<p>I was recently answering a question that came in from a MATLAB user on this blog. In the end, the question was really one where he was doing a calculation and storing the result in scalar Y. When he was done with the loop, he only had the final value of Y but not all of them that he had calculated on the way. The solution to this was to store each value of Y into a vector. This video is meant for new users to show how to do that.<\/p>\n<p><embed src=\"https:\/\/blogs.mathworks.com\/images\/pick\/\/FlashVideos\/FlowPlayer.swf?config=%7Bembedded%3Atrue%2CbaseURL%3A%27http%3A%2F%2Fblogs%2Emathworks%2Ecom%2Fimages%2Fpick%2F%2FFlashVideos%27%2CsplashImageFile%3A%2717%20Basics%20storing%20data%20in%20a%20matrix%2Ejpg%27%2CvideoFile%3A%2717%20Basics%20storing%20data%20in%20a%20matrix%2Eflv%27%2Cloop%3Afalse%2CinitialScale%3A%27fit%27%2CshowFullScreenButton%3Afalse%2CautoBuffering%3Afalse%2CmenuItems%3A%5Bfalse%2Cfalse%2Cfalse%2Cfalse%2Cfalse%2Ctrue%5D%2CautoPlay%3Afalse%7D\" type=\"application\/x-shockwave-flash\" width=\"500\" height=\"400\"><\/embed><\/p>\n<p>Also note, that I have been reformatting these videos and tagging them as videos. If you click on videos under categories to the right, you can see all the videos in one place.<br \/>\n<a id=\"p2027\" class=\"imagelink\" title=\"video.jpg\" rel=\"attachment\"><img decoding=\"async\" id=\"image2027\" src=\"https:\/\/blogs.mathworks.com\/pick\/..\/images\/pick\/video.jpg\" alt=\"video.jpg\" \/><\/a><\/p>\n<p>Other videos have been gathered here:<br \/>\n<a href=\"https:\/\/blogs.mathworks.com\/pick\/category\/video\/\">https:\/\/blogs.mathworks.com\/pick\/category\/video\/<\/a><\/p>\n<p>Other MATLAB Basics posts have been gathered here:<br \/>\n<a href=\"https:\/\/blogs.mathworks.com\/pick\/category\/matlab-basics\/\">https:\/\/blogs.mathworks.com\/pick\/category\/matlab-basics\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was recently answering a question that came in from a MATLAB user on this blog. In the end, the question was really one where he was doing a calculation and storing the result in scalar Y. When he&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2007\/08\/20\/matlab-basics-video\/\">read more >><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,2],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2028"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2028"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2028\/revisions"}],"predecessor-version":[{"id":8064,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2028\/revisions\/8064"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}