{"id":445,"date":"2012-12-24T12:20:38","date_gmt":"2012-12-24T17:20:38","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=445"},"modified":"2016-12-05T13:57:06","modified_gmt":"2016-12-05T18:57:06","slug":"seasons-greetings","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2012\/12\/24\/seasons-greetings\/","title":{"rendered":"Season&#8217;s Greetings"},"content":{"rendered":"&nbsp;\r\n<div class=\"content\">\r\n<h3>Season's Greetings<\/h3>\r\n<pre>help greetings<\/pre>\r\n<pre class=\"codeinput\"><span class=\"comment\">%   greetings  Seasonal holiday fractal.<\/span>\r\n<span class=\"comment\">%   greetings(phi) generates a seasonal holiday fractal that depends<\/span>\r\n<span class=\"comment\">%   upon the parameter phi.  The default value of phi is the golden ratio.<\/span>\r\n<span class=\"comment\">%   What happens for other values of phi?  Try both simple fractions<\/span>\r\n<span class=\"comment\">%   and floating point approximations to irrational values.<\/span>\r\n<\/pre>\r\n<pre>which greetings<\/pre>\r\n<a href=\"https:\/\/www.mathworks.com\/content\/dam\/mathworks\/mathworks-dot-com\/moler\/ncm\/greetings.m\">https:\/\/www.mathworks.com\/content\/dam\/mathworks\/mathworks-dot-com\/moler\/ncm\/greetings.m<\/a>\r\n<pre>phi = (1+sqrt(5))\/2\r\ngreetings(phi)<\/pre>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/greeting_1.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<pre>greetings((1+sqrt(5))\/3)<\/pre>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/greeting_2.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<pre>greetings((1+sqrt(5))\/13)<\/pre>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/greeting_3.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<pre>greetings(3.14)<\/pre>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/greeting_4.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n<pre>greetings(.964)<\/pre>\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/cleve\/greeting_5.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\n<i>... and best wishes for the new year.<\/i>\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_66433a39856143cca2be8357d3325b8f() {\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='66433a39856143cca2be8357d3325b8f ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 66433a39856143cca2be8357d3325b8f';\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 2012 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<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>\r\n\r\n\r\n\\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<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae R2012b<\/p>\r\n<p class=\"footer\">\r\nPublished with MATLAB\u00ae R2012b<\/p>\r\n\r\n<\/div>\r\n<!--\r\n66433a39856143cca2be8357d3325b8f ##### SOURCE BEGIN #####\r\n%% Season's Greetings\r\n%\r\n%  help greetings\r\n\r\n%   greetings  Seasonal holiday fractal.\r\n%   greetings(phi) generates a seasonal holiday fractal that depends\r\n%   upon the parameter phi.  The default value of phi is the golden ratio.\r\n%   What happens for other values of phi?  Try both simple fractions\r\n%   and floating point approximations to irrational values.\r\n\r\n%%\r\n%  which greetings\r\n%\r\n% <https:\/\/www.mathworks.com\/moler.htmlncm\/greetings.m>\r\n\r\n%%\r\n%\r\n%  phi = (1+sqrt(5))\/2\r\n%  greetings(phi)\r\n%\r\n% <<greeting_1.png>>\r\n%\r\n\r\n%%\r\n%\r\n%  greetings((1+sqrt(5))\/3)\r\n%\r\n% <<greeting_2.png>>\r\n\r\n%%\r\n%\r\n%  greetings((1+sqrt(5))\/13)\r\n%\r\n% <<greeting_3.png>>\r\n\r\n%%\r\n%\r\n%  greetings(3.14)\r\n%\r\n% <<greeting_4.png>>\r\n\r\n%%\r\n%\r\n%  greetings(.964)\r\n%\r\n% <<greeting_5.png>>\r\n\r\n%%\r\n% _... and best wishes for the new year._\r\n\r\n##### SOURCE END ##### 66433a39856143cca2be8357d3325b8f\r\n-->","protected":false},"excerpt":{"rendered":"<p>&nbsp;\r\n\r\nSeason's Greetings\r\nhelp greetings\r\n%   greetings  Seasonal holiday fractal.\r\n%   greetings(phi) generates a seasonal holiday fractal that depends\r\n%   upon the parameter phi.  The default... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2012\/12\/24\/seasons-greetings\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,23],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/445"}],"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=445"}],"version-history":[{"count":8,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":2180,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/445\/revisions\/2180"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}