{"id":279,"date":"2008-06-23T13:06:07","date_gmt":"2008-06-23T18:06:07","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2008\/06\/23\/matlab-basics-cell-arrays-for-holding-different-data-types\/"},"modified":"2016-04-04T15:14:07","modified_gmt":"2016-04-04T20:14:07","slug":"matlab-basics-cell-arrays-for-holding-different-data-types","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2008\/06\/23\/matlab-basics-cell-arrays-for-holding-different-data-types\/","title":{"rendered":"MATLAB Basics: Cell arrays for holding different data types"},"content":{"rendered":"Sometimes in MATLAB you are going to want to store different data types together in one construct rather than try and keep track of different variables. Structures work for this, but sometimes it is nice to be able to refer to the data in row and column notation rather than by field name. That is where cell arrays work best.\r\n\r\nThis video will show the construction of a cell array that contains four scalars and then a string is added. Finally, a cell array is put inside of the original cell array. This is possible, because cell arrays can hold any data type.\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=\"3877438031001\" 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><\/div>\r\n&nbsp;","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2008\/06\/23\/matlab-basics-cell-arrays-for-holding-different-data-types\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/38f63a7c-893e-4360-8dd9-b0c6bae6b640\/16f95fc4-6977-4997-a571-f1c394545f2c\/160x90\/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:05<\/time><\/span>\n      <\/div>\n      <\/a><\/div><p>Sometimes in MATLAB you are going to want to store different data types together in one construct rather than try and keep track of different variables. Structures work for this, but sometimes it is&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2008\/06\/23\/matlab-basics-cell-arrays-for-holding-different-data-types\/\">read more >><\/a><\/p>","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[19,4,17],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/279"}],"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=279"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/279\/revisions"}],"predecessor-version":[{"id":2128,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/279\/revisions\/2128"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}