{"id":13058,"date":"2025-07-12T10:01:57","date_gmt":"2025-07-12T14:01:57","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=13058"},"modified":"2025-07-13T12:09:18","modified_gmt":"2025-07-13T16:09:18","slug":"my-favorite-matlab-demos","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2025\/07\/12\/my-favorite-matlab-demos\/","title":{"rendered":"My Favorite MATLAB Demos"},"content":{"rendered":"<div class=\"content\"><!--introduction-->\r\n<p>In 1988, while I was with Ardent Computer in Silicon Valley, I gave a talk that previewed MATLAB graphics. The title was \"Pictures of Matrices\". At the time, a mathematician friend of mine asked.<\/p>\r\n<pre>  Why would anyone want pictures of matrices?<\/pre>\r\n<p>My response is the graphics demonstrations that we have done over the years. Here is a baker's dozen of my favorite examples.<\/p>\r\n<!--\/introduction-->\r\n<h3>Contents<\/h3>\r\n<div>\r\n<ul>\r\n<li>\r\n<a href=\"#1050b54b-03cc-4651-a92f-08b47bce1aba\">Vibes<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#cca646f4-d29d-4f64-8b12-9c8d6868aa07\">Pitch, Roll and Yaw<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#523be0a1-ef64-4117-8827-aadab1aec717\">Rubiks Cube<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#6c148e13-491e-48c4-8a1f-17bd6e1208ab\">Eigenwalker<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#5808e6ab-e3fa-4128-b43b-94218f7d6659\">Simulation<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#37dae5b7-d02a-41e0-805c-11d11d1418f8\">Sponge<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#9916dfbf-68eb-45a6-8e75-695014dcbc68\">Drums<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#744ce13d-9dbe-42d9-a2df-f3d6dc3c2548\">Jahnke and Emde<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#52de6435-9b73-4c4e-8402-401b64ad6571\">Penny<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#3fe4f412-05a9-4faf-823f-321a39baeb80\">Jordan Form<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#c90e69f0-d3f5-4e44-a23a-c7434bffc251\">Expshow<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#b73f8b6f-ac84-4b66-9b08-303afb8eaf13\">Eigshow<\/a>\r\n<\/li>\r\n<li>\r\n<a href=\"#8cac3156-b0b3-47d7-abf4-653302fc719c\">Eden<\/a>\r\n<\/li>\r\n<\/ul>\r\n<\/div>\r\n<h4>Vibes<a name=\"1050b54b-03cc-4651-a92f-08b47bce1aba\"><\/a>\r\n<\/h4>\r\n<p>The vibrating L-shaped membrane.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2023\/12\/13\/blog-post-number-300-vibrating-logo\/\">https:\/\/blogs.mathworks.com\/cleve\/2023\/12\/13\/blog-post-number-300-vibrating-logo\/<\/a>.<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/vibes.gif\" alt=\"\"> <\/p>\r\n<h4>Pitch, Roll and Yaw<a name=\"cca646f4-d29d-4f64-8b12-9c8d6868aa07\"><\/a>\r\n<\/h4>\r\n<p>Studying rotations.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/10\/grafix-users-guide\/\">https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/10\/grafix-users-guide\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/Graphics.png\" alt=\"\"> <\/p>\r\n<h4>Rubiks Cube<a name=\"523be0a1-ef64-4117-8827-aadab1aec717\"><\/a>\r\n<\/h4>\r\n<p>The world's greatest mathematical puzzle.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2022\/04\/04\/digital-simulation-of-rubiks-cube\/\">https:\/\/blogs.mathworks.com\/cleve\/2022\/04\/04\/digital-simulation-of-rubiks-cube\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/Qube_simplified.png\" alt=\"\"> <\/p>\r\n<h4>Eigenwalker<a name=\"6c148e13-491e-48c4-8a1f-17bd6e1208ab\"><\/a>\r\n<\/h4>\r\n<p>Principle component analysis of the human gait.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2016\/04\/11\/the-eigenwalker-model-of-the-human-gait\/\">https:\/\/blogs.mathworks.com\/cleve\/2016\/04\/11\/the-eigenwalker-model-of-the-human-gait\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/walker-1.gif\" alt=\"\"> <\/p>\r\n<h4>Simulation<a name=\"5808e6ab-e3fa-4128-b43b-94218f7d6659\"><\/a>\r\n<\/h4>\r\n<p>Simulink at the test track.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2023\/09\/11\/exploring-matrices\/\">https:\/\/blogs.mathworks.com\/cleve\/2023\/09\/11\/exploring-matrices\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/Simulink.png\" alt=\"\"> <\/p>\r\n<h4>Sponge<a name=\"37dae5b7-d02a-41e0-805c-11d11d1418f8\"><\/a>\r\n<\/h4>\r\n<p>The Menger sponge is a popular fractal that generalizes Cantor sets and Sierpinski triangles.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2021\/12\/06\/the-menger-sponge-fractal\/\">https:\/\/blogs.mathworks.com\/cleve\/2021\/12\/06\/the-menger-sponge-fractal\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/sponge2.png\" alt=\"\"> <\/p>\r\n<h4>Drums<a name=\"9916dfbf-68eb-45a6-8e75-695014dcbc68\"><\/a>\r\n<\/h4>\r\n<p>Contour plots of isospectral pairs.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2012\/08\/06\/can-one-hear-the-shape-of-a-drum-part-1-eigenvalues\/\">https:\/\/blogs.mathworks.com\/cleve\/2012\/08\/06\/can-one-hear-the-shape-of-a-drum-part-1-eigenvalues\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/drums.png\" alt=\"\"> <\/p>\r\n<h4>Jahnke and Emde<a name=\"744ce13d-9dbe-42d9-a2df-f3d6dc3c2548\"><\/a>\r\n<\/h4>\r\n<p>Contour plot of the Hankel function, based on a hand drawing in a 1933 book by German mathematicians Eugene Jahnke and Fritz Emde.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2014\/12\/15\/jahnke-and-emde-revisited\/\">https:\/\/blogs.mathworks.com\/cleve\/2014\/12\/15\/jahnke-and-emde-revisited\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/jahnke.png\" alt=\"\"> <\/p>\r\n<h4>Penny<a name=\"52de6435-9b73-4c4e-8402-401b64ad6571\"><\/a>\r\n<\/h4>\r\n<p>High resolution measurements of the depth of the mold for the United States one cent coin.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2014\/03\/17\/higher-resolution-penny\/\">https:\/\/blogs.mathworks.com\/cleve\/2014\/03\/17\/higher-resolution-penny\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/penny.png\" alt=\"\"> <\/p>\r\n<h4>Jordan Form<a name=\"3fe4f412-05a9-4faf-823f-321a39baeb80\"><\/a>\r\n<\/h4>\r\n<p>Jordan Canonical Form of the 64-by-64 Redheffer matrix from the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2024b\/matlab\/ref\/gallery.html\">MATLAB Gallery<\/a>.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2025\/06\/12\/a-million-dollar-matrix\/\">https:\/\/blogs.mathworks.com\/cleve\/2025\/06\/12\/a-million-dollar-matrix\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/jcf64.png\" alt=\"\"> <\/p>\r\n<h4>Expshow<a name=\"c90e69f0-d3f5-4e44-a23a-c7434bffc251\"><\/a>\r\n<\/h4>\r\n<p>An interactive graphical experiment lets you discover the value of one of the most important numerical quantities in mathematics.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2015\/07\/27\/discover-e-with-a-graphical-experiment\/\">https:\/\/blogs.mathworks.com\/cleve\/2015\/07\/27\/discover-e-with-a-graphical-experiment\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/expshow.gif\" alt=\"\"> <\/p>\r\n<h4>Eigshow<a name=\"b73f8b6f-ac84-4b66-9b08-303afb8eaf13\"><\/a>\r\n<\/h4>\r\n<p>One of my all-time favorite MATLAB examples is eigshow.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2013\/07\/08\/eigshow-week-1\">https:\/\/blogs.mathworks.com\/cleve\/2013\/07\/08\/eigshow-week-1<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/eigshowp.gif\" alt=\"\"> <\/p>\r\n<h4>Eden<a name=\"8cac3156-b0b3-47d7-abf4-653302fc719c\"><\/a>\r\n<\/h4>\r\n<p>This sketch of the MathWorks Logo was made by Eden Rajapakse when she was ten years old. Her blog post has received more \"likes\" than any other post.<\/p>\r\n<p>\r\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2021\/12\/23\/a-new-view-of-our-logo\/\">https:\/\/blogs.mathworks.com\/cleve\/2021\/12\/23\/a-new-view-of-our-logo\/<\/a>\r\n<\/p>\r\n<p>\r\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/Eden.png\" alt=\"\"> <\/p>\r\n<script language=\"JavaScript\"> <!-- \r\n    function grabCode_2ccfc7657e20451c9a4b077ee478fbf0() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='2ccfc7657e20451c9a4b077ee478fbf0 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 2ccfc7657e20451c9a4b077ee478fbf0';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        copyright = 'Copyright 2025 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n\r\n        d.title = title + ' (MATLAB code)';\r\n        d.close();\r\n    }   \r\n     --> <\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\">\r\n<br>\r\n<a href=\"javascript:grabCode_2ccfc7657e20451c9a4b077ee478fbf0()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript>\r\n<\/span><\/a>\r\n<br>\r\n<br>\r\n      Published with MATLAB&reg; R2024b<br>\r\n<\/p>\r\n<\/div>\r\n<!--\r\n2ccfc7657e20451c9a4b077ee478fbf0 ##### SOURCE BEGIN #####\r\n%% My Favorite MATLAB Demos\r\n% In 1988, while I was with Ardent Computer in Silicon Valley,\r\n% I gave a talk that previewed MATLAB graphics.  The title was\r\n% \"Pictures of Matrices\".  At the time, a mathematician friend\r\n% of mine asked.\r\n%\r\n%    Why would anyone want pictures of matrices?\r\n%\r\n% My response is the graphics demonstrations that we have done over the\r\n% years.  Here is a baker's dozen of my favorite examples.\r\n\r\n%% Vibes\r\n% The vibrating L-shaped membrane.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2023\/12\/13\/blog-post-number-300-vibrating-logo\/>.\r\n%\r\n% <<vibes.gif>>\r\n%\r\n\r\n\r\n%% Pitch, Roll and Yaw\r\n% Studying rotations.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2023\/02\/10\/grafix-users-guide\/>\r\n%\r\n% <<Graphics.png>>\r\n%\r\n\r\n%% Rubiks Cube\r\n% The world's greatest mathematical puzzle.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2022\/04\/04\/digital-simulation-of-rubiks-cube\/>\r\n%\r\n% <<Qube_simplified.png>>\r\n%\r\n  \r\n%% Eigenwalker\r\n% Principle component analysis of the human gait.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2016\/04\/11\/the-eigenwalker-model-of-the-human-gait\/>\r\n%\r\n% <<walker-1.gif>>\r\n%\r\n\r\n%% Simulation\r\n% Simulink at the test track.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2023\/09\/11\/exploring-matrices\/>\r\n%\r\n% <<Simulink.png>>\r\n\r\n%% Sponge\r\n% The Menger sponge is a popular fractal that generalizes Cantor sets \r\n% and Sierpinski triangles. \r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2021\/12\/06\/the-menger-sponge-fractal\/>\r\n%\r\n% <<sponge2.png>>\r\n\r\n%% Drums\r\n% Contour plots of isospectral pairs.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2012\/08\/06\/can-one-hear-the-shape-of-a-drum-part-1-eigenvalues\/>\r\n%\r\n% <<drums.png>>\r\n\r\n%% Jahnke and Emde\r\n% Contour plot of the Hankel function,\r\n% based on a hand drawing in a 1933 book by\r\n% German mathematicians Eugene Jahnke and Fritz Emde.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2014\/12\/15\/jahnke-and-emde-revisited\/>\r\n%\r\n% <<jahnke.png>>\r\n\r\n%% Penny\r\n% High resolution measurements of the depth of the mold for the\r\n% United States one cent coin.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2014\/03\/17\/higher-resolution-penny\/>\r\n%\r\n% <<penny.png>>\r\n\r\n%% Jordan Form\r\n% Jordan Canonical Form of the 64-by-64 Redheffer matrix\r\n% from the \r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2024b\/matlab\/ref\/gallery.html\r\n% MATLAB Gallery>.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2025\/06\/12\/a-million-dollar-matrix\/>\r\n%\r\n% <<jcf64.png>>\r\n\r\n%% Expshow\r\n% An interactive graphical experiment lets you discover the value of one of the most important numerical quantities in mathematics.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2015\/07\/27\/discover-e-with-a-graphical-experiment\/>\r\n%\r\n% <<expshow.gif>>\r\n\r\n%% Eigshow\r\n% One of my all-time favorite MATLAB examples is eigshow.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2013\/07\/08\/eigshow-week-1>\r\n%\r\n% <<eigshowp.gif>>\r\n%\r\n%% Eden\r\n% This sketch of the MathWorks Logo was made by Eden Rajapakse when \r\n% she was ten years old.  Her blog post has received more \"likes\"\r\n% than any other post.\r\n%\r\n% <https:\/\/blogs.mathworks.com\/cleve\/2021\/12\/23\/a-new-view-of-our-logo\/>\r\n%\r\n% <<Eden.png>>\r\n%\r\n\r\n\r\n##### SOURCE END ##### 2ccfc7657e20451c9a4b077ee478fbf0\r\n-->\r\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/vibes.gif\" onError=\"this.style.display ='none';\" \/><\/div><!--introduction-->\r\n<p>In 1988, while I was with Ardent Computer in Silicon Valley, I gave a talk that previewed MATLAB graphics. The title was \"Pictures of Matrices\". At the time, a mathematician friend of mine asked.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2025\/07\/12\/my-favorite-matlab-demos\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[32,13,5,23,4,25],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/13058"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=13058"}],"version-history":[{"count":3,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/13058\/revisions"}],"predecessor-version":[{"id":13070,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/13058\/revisions\/13070"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=13058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=13058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=13058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}