{"id":8001,"date":"2021-09-29T16:17:14","date_gmt":"2021-09-29T20:17:14","guid":{"rendered":"https:\/\/blogs.mathworks.com\/community\/?p=8001"},"modified":"2021-09-30T10:11:20","modified_gmt":"2021-09-30T14:11:20","slug":"twenty-a-birthday-a-contest-an-explosion-of-images","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2021\/09\/29\/twenty-a-birthday-a-contest-an-explosion-of-images\/","title":{"rendered":"Twenty: A Birthday, a Contest, an Explosion of Images"},"content":{"rendered":"<div class=\"rtcContent\">\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">As I said in my <a href=\"https:\/\/blogs.mathworks.com\/community\/2021\/09\/09\/and-now-we-are-20\/\">last post<\/a>, here at the MathWorks Community blog we are currently celebrating an important milestone: MATLAB Central is 20 years old!<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">It's a fine number, 20. Certain numbers just come across as friendly, and I've always been fond of 20. It's hanging out at the corner of Binary and Decimal, smiling pleasantly to everyone who walks by. What can we do to honor it and MATLAB Central? What are some of the factors that make 20 so admirable? I can think of a few.<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">factor(20)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement\" style=\"width: 1146px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\" data-testid=\"output_0\" data-width=\"1116\">\n<div class=\"matrixElement veSpecifier saveLoad eoOutputContent\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"veVariableName variableNameElement double\" style=\"width: 1116px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"headerElementClickToInteract\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\"><span style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">ans = <\/span><span class=\"veVariableValueSummary veMetaSummary\" style=\"white-space: normal; font-style: normal; color: #b3b3b3; font-size: 12px;\">1\u00d73<\/span><\/div>\n<\/div>\n<div class=\"valueContainer\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\" data-layout=\"{&quot;columnWidth&quot;:40,&quot;totalColumns&quot;:&quot;3&quot;,&quot;totalRows&quot;:&quot;1&quot;,&quot;charsPerColumn&quot;:6}\">\n<div class=\"variableValue\" style=\"width: 122px; white-space: pre; font-style: normal; color: #404040; font-size: 12px;\">2 2 5<\/div>\n<div class=\"horizontalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<div class=\"verticalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Its literal factors make it clear that 20 is a so-called pronic number. That just means it takes the form n*(n+1).<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">4*5<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"variableElement\" style=\"font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12px;\">ans = 20<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">That's pronicity for you. I love how you can take an uninteresting fact about a number, give it a fancy name, and suddenly it becomes more interesting [<span style=\"font-style: italic;\">strokes goatee, saying \"Yes, pronic. Yes.\"<\/span>].<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Now, what can we do with those factors?<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">d = divisors(20)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement\" style=\"width: 1146px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\" data-testid=\"output_2\" data-width=\"1116\">\n<div class=\"matrixElement veSpecifier saveLoad eoOutputContent\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"veVariableName variableNameElement double\" style=\"width: 1116px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"headerElementClickToInteract\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\"><span style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">d = <\/span><span class=\"veVariableValueSummary veMetaSummary\" style=\"white-space: normal; font-style: normal; color: #b3b3b3; font-size: 12px;\">1\u00d76<\/span><\/div>\n<\/div>\n<div class=\"valueContainer\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\" data-layout=\"{&quot;columnWidth&quot;:40,&quot;totalColumns&quot;:&quot;6&quot;,&quot;totalRows&quot;:&quot;1&quot;,&quot;charsPerColumn&quot;:6}\">\n<div class=\"variableValue\" style=\"width: 242px; white-space: pre; font-style: normal; color: #404040; font-size: 12px;\">1 2 4 5 10 20<\/div>\n<div class=\"horizontalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<div class=\"verticalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">sum(d)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"variableElement\" style=\"font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12px;\">ans = 42<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">This is fun. The answer to life, the universe, and everything may be 42, but what is the question? Now you know: it's \"What is the sum of the divisors of 20?\" (Note for those of you following along at home: divisors is from the Symbolic Math Toolbox.)<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">I wrote a short poem of admiration for 20. It goes like this.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-style: italic;\"> Two, four, six, eight!<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-style: italic;\"> Who do we appreciate?<\/span><\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">sum([2 4 6 8])<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"variableElement\" style=\"font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12px;\">ans = 20<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Yes, it's our friend 20. We can refactor our code and our poem like so.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-style: italic;\"> Twice the sum of one through four!<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-style: italic;\"> What's the number we adore?<\/span><\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">2*sum(1:4)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"variableElement\" style=\"font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 12px;\">ans = 20<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The sum of 1 through n is the nth <a href=\"https:\/\/en.wikipedia.org\/wiki\/Triangular_number\">triangular number<\/a>. So we notice that 20 is twice the fourth triangular number. And 20 is itself the fourth <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tetrahedral_number\">tetrahedral number<\/a>. Watch how these <a href=\"https:\/\/en.wikipedia.org\/wiki\/Figurate_number\">\"figurate\" numbers<\/a> accumulate.<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">unit = [1 1 1 1]<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement\" style=\"width: 1146px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\" data-testid=\"output_6\" data-width=\"1116\">\n<div class=\"matrixElement veSpecifier saveLoad eoOutputContent\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"veVariableName variableNameElement double\" style=\"width: 1116px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"headerElementClickToInteract\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\"><span style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">unit = <\/span><span class=\"veVariableValueSummary veMetaSummary\" style=\"white-space: normal; font-style: normal; color: #b3b3b3; font-size: 12px;\">1\u00d74<\/span><\/div>\n<\/div>\n<div class=\"valueContainer\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\" data-layout=\"{&quot;columnWidth&quot;:40,&quot;totalColumns&quot;:&quot;4&quot;,&quot;totalRows&quot;:&quot;1&quot;,&quot;charsPerColumn&quot;:6}\">\n<div class=\"variableValue\" style=\"width: 162px; white-space: pre; font-style: normal; color: #404040; font-size: 12px;\">1 1 1 1<\/div>\n<div class=\"horizontalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<div class=\"verticalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">linear = cumsum(unit)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement\" style=\"width: 1146px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\" data-testid=\"output_7\" data-width=\"1116\">\n<div class=\"matrixElement veSpecifier saveLoad eoOutputContent\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"veVariableName variableNameElement double\" style=\"width: 1116px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"headerElementClickToInteract\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\"><span style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">linear = <\/span><span class=\"veVariableValueSummary veMetaSummary\" style=\"white-space: normal; font-style: normal; color: #b3b3b3; font-size: 12px;\">1\u00d74<\/span><\/div>\n<\/div>\n<div class=\"valueContainer\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\" data-layout=\"{&quot;columnWidth&quot;:40,&quot;totalColumns&quot;:&quot;4&quot;,&quot;totalRows&quot;:&quot;1&quot;,&quot;charsPerColumn&quot;:6}\">\n<div class=\"variableValue\" style=\"width: 162px; white-space: pre; font-style: normal; color: #404040; font-size: 12px;\">1 2 3 4<\/div>\n<div class=\"horizontalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<div class=\"verticalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">triangular = cumsum(linear)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement\" style=\"width: 1146px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\" data-testid=\"output_8\" data-width=\"1116\">\n<div class=\"matrixElement veSpecifier saveLoad eoOutputContent\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"veVariableName variableNameElement double\" style=\"width: 1116px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"headerElementClickToInteract\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\"><span style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">triangular = <\/span><span class=\"veVariableValueSummary veMetaSummary\" style=\"white-space: normal; font-style: normal; color: #b3b3b3; font-size: 12px;\">1\u00d74<\/span><\/div>\n<\/div>\n<div class=\"valueContainer\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\" data-layout=\"{&quot;columnWidth&quot;:40,&quot;totalColumns&quot;:&quot;4&quot;,&quot;totalRows&quot;:&quot;1&quot;,&quot;charsPerColumn&quot;:6}\">\n<div class=\"variableValue\" style=\"width: 162px; white-space: pre; font-style: normal; color: #404040; font-size: 12px;\">1 3 6 10<\/div>\n<div class=\"horizontalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<div class=\"verticalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">tetrahedral = cumsum(triangular)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement\" style=\"width: 1146px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\" data-testid=\"output_9\" data-width=\"1116\">\n<div class=\"matrixElement veSpecifier saveLoad eoOutputContent\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"veVariableName variableNameElement double\" style=\"width: 1116px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"headerElementClickToInteract\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\"><span style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">tetrahedral = <\/span><span class=\"veVariableValueSummary veMetaSummary\" style=\"white-space: normal; font-style: normal; color: #b3b3b3; font-size: 12px;\">1\u00d74<\/span><\/div>\n<\/div>\n<div class=\"valueContainer\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\" data-layout=\"{&quot;columnWidth&quot;:40,&quot;totalColumns&quot;:&quot;4&quot;,&quot;totalRows&quot;:&quot;1&quot;,&quot;charsPerColumn&quot;:6}\">\n<div class=\"variableValue\" style=\"width: 162px; white-space: pre; font-style: normal; color: #404040; font-size: 12px;\">1 4 10 20<\/div>\n<div class=\"horizontalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<div class=\"verticalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-style: italic;\"> Two, four, six, eight!<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\"><span style=\"font-style: italic;\"> How do we accumulate?<\/span><\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Okay, I'll lay off the poetry. But all this accumulation reminds me that this same set of numbers can be found in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pascal%27s_triangle\">Blaise Pascal's favorite triangle<\/a>. And there, surveying all, seated serenely in the bottom right corner, is our guest of honor.<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; border: 1px solid #e9e9e9;\"><span style=\"white-space: pre;\">pascal(4)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement\" style=\"width: 1146px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\" data-testid=\"output_10\" data-width=\"1116\">\n<div class=\"matrixElement veSpecifier saveLoad eoOutputContent\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"veVariableName variableNameElement double\" style=\"width: 1116px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"headerElementClickToInteract\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\"><span style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">ans = <\/span><span class=\"veVariableValueSummary veMetaSummary\" style=\"white-space: normal; font-style: normal; color: #b3b3b3; font-size: 12px;\">4\u00d74<\/span><\/div>\n<\/div>\n<div class=\"valueContainer\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\" data-layout=\"{&quot;columnWidth&quot;:40,&quot;totalColumns&quot;:&quot;4&quot;,&quot;totalRows&quot;:&quot;4&quot;,&quot;charsPerColumn&quot;:6}\">\n<div class=\"variableValue\" style=\"width: 162px; white-space: pre; font-style: normal; color: #404040; font-size: 12px;\">1 1 1 1<br \/>\n1 2 3 4<br \/>\n1 3 6 10<br \/>\n1 4 10 20<\/div>\n<div class=\"horizontalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<div class=\"verticalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 style=\"margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #3c3c3c; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Twenty Characters<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Those are some things we can do with the number 20. But enough number theory! What can we do with 20 characters of code? Here's a nifty plot that uses only 15 characters. The default colors make for a nice Mexican blanket effect. Call it an area rug. Heh.<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9; border-bottom: 0px none #000000; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% 20 char. limit =&gt;|<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 1px solid #e9e9e9; border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">area(magic(20))<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsFigure\" style=\"width: 1146px;\" data-testid=\"output_11\">\n<div class=\"figureElement eoOutputContent\"><img decoding=\"async\" loading=\"lazy\" width=\"448\" height=\"336\" class=\"alignnone size-full wp-image-7965\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/minihack_20th_1-1.png\" alt=\"\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">It looks better without the axis on, but that would put me over the character limit.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Here's one in honor of Cleve Moler, the father of MATLAB. Behold, 20 characters that reveal the <a href=\"https:\/\/blogs.mathworks.com\/community\/2019\/07\/12\/who-named-molers-matrix\/\">Moler matrix<\/a> of order 20.<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9; border-bottom: 0px none #000000; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #028009;\">% 20 char. limit =&gt;|<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 1px solid #e9e9e9; border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">gallery(<span style=\"color: #aa04f9;\">\"moler\"<\/span>, 20)<\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsVariableMatrixElement\" style=\"width: 1146px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\" data-testid=\"output_12\" data-width=\"1116\">\n<div class=\"matrixElement veSpecifier saveLoad eoOutputContent\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"veVariableName variableNameElement double\" style=\"width: 1116px; white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">\n<div class=\"headerElementClickToInteract\" style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\"><span style=\"white-space: normal; font-style: normal; color: #404040; font-size: 12px;\">ans = <\/span><span class=\"veVariableValueSummary veMetaSummary\" style=\"white-space: normal; font-style: normal; color: #b3b3b3; font-size: 12px;\">20\u00d720<\/span><\/div>\n<\/div>\n<div class=\"valueContainer\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\" data-layout=\"{&quot;columnWidth&quot;:40,&quot;totalColumns&quot;:&quot;20&quot;,&quot;totalRows&quot;:&quot;20&quot;,&quot;charsPerColumn&quot;:6}\">\n<div class=\"variableValue\" style=\"width: 802px; white-space: pre; font-style: normal; color: #404040; font-size: 12px;\">1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1<br \/>\n-1 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0<br \/>\n-1 0 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1<br \/>\n-1 0 1 4 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2<br \/>\n-1 0 1 2 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3<br \/>\n-1 0 1 2 3 6 4 4 4 4 4 4 4 4 4 4 4 4 4 4<br \/>\n-1 0 1 2 3 4 7 5 5 5 5 5 5 5 5 5 5 5 5 5<br \/>\n-1 0 1 2 3 4 5 8 6 6 6 6 6 6 6 6 6 6 6 6<br \/>\n-1 0 1 2 3 4 5 6 9 7 7 7 7 7 7 7 7 7 7 7<br \/>\n-1 0 1 2 3 4 5 6 7 10 8 8 8 8 8 8 8 8 8 8<\/div>\n<div class=\"horizontalEllipsis hide\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<div class=\"verticalEllipsis\" style=\"white-space: nowrap; font-style: normal; color: #404040; font-size: 12px;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">I need another two lines to show you what it looks like. Pretty easy on the eyes, eh? But beware! It has one very small eigenvalue that can easily upset naive elimination methods. Or so I'm told.<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9; border-bottom: 0px none #000000; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">imagesc(ans)<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 1px solid #e9e9e9; border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">axis <span style=\"color: #aa04f9;\">square<\/span><\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsFigure\" style=\"width: 1146px;\" data-testid=\"output_13\">\n<div class=\"figureElement eoOutputContent\"><img decoding=\"async\" loading=\"lazy\" width=\"448\" height=\"336\" class=\"alignnone size-full wp-image-7968\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/minihack_20th_2-1.png\" alt=\"\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 style=\"margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #3c3c3c; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">Twenty Lines<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">What can we do with 20 lines of code? This little Mandelbrot set just fits. All without even cheating by cramming multiple statements onto one line of code.<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9; border-bottom: 0px none #000000; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">p = 500;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">x0 = -0.6;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">r = 1.5;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">k = 50;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">x = linspace(x0-r, x0+r, p);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">y = linspace(-r, r, p);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">[X, Y] = meshgrid(x, y);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">Z = X + 1i*Y;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">m = k*ones(size(Z));<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">z = Z;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #0e00ff;\">for <\/span>n = 0:k<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> z = z.*z+Z;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> h = abs(z)&gt;2;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> z(h) = NaN;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> m(h) = n;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #0e00ff;\">end<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">imagesc(m)<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">colormap([parula(k-1);0 0 0])<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">axis <span style=\"color: #aa04f9;\">equal<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 1px solid #e9e9e9; border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">axis <span style=\"color: #aa04f9;\">off<\/span><\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsFigure\" style=\"width: 1146px;\" data-testid=\"output_14\">\n<div class=\"figureElement eoOutputContent\"><img decoding=\"async\" loading=\"lazy\" width=\"448\" height=\"336\" class=\"alignnone size-full wp-image-7971\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/minihack_20th_3-1.png\" alt=\"\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 style=\"margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: #3c3c3c; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;\">A Contest of Characters: the MATLAB Mini Hack<\/h2>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Playing around with numbers, code, and images is fun, but there is a point to my meandering. I want to introduce an exciting anniversary celebration contest that we're going to launch next week. We call it the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/contests\/20th-anniversary-matlab-minihack.html\">MATLAB Mini Hack<\/a>. It's a constrained character-count coding contest. And as long as I'm alliterating, I can tell you that it is also collaborative and colorful.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">The contest centers around this question: what fun image can you make in MATLAB using no more than 280 characters of code? I'll give you an example. Weighing in at only 278 characters, the Mandelbrot code shown above fits the bill.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">We're calling the Mini Hack a contest, but it's really meant to be mostly about the fun. With that in mind, we encourage you not only to contribute your original ideas, but also to steal, or rather \"remix\", other people's code. Build on top of their ideas, and make even more colorful mischief. And if you see someone remixing your code, remember: that's a good thing! Be proud.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">I'm so excited about this contest, I'll be doing a live Instagram event this Friday (1 October) at 10am EST. I'll be talking about the history of MATLAB Central, how we are celebrating the 20th Anniversary, and everything you need to know about this crazy, kaleidoscopic contest.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Please join me at <a href=\"http:\/\/instagram.com\/matlab\">http:\/\/instagram.com\/matlab<\/a>.<\/div>\n<div style=\"margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: #000000; font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left;\">Speaking of kaleidoscopes, I'll close with 280 characters of rotationally symmetric hgtransformed joy.<\/div>\n<div style=\"background-color: #f7f7f7; margin: 10px 0 10px 0;\">\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 1px solid #e9e9e9; border-bottom: 0px none #000000; border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">x = linspace(0, 4*pi);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">y = 0.5*x.*sin(x);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">h1 = plot(x, y, LineWidth=6);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">k = 20;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">c = hsv(k);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #0e00ff;\">for <\/span>n = 1:k<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> h2 = copyobj(h1, gca);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> t = hgtransform;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> set(h2,Parent=t,Color=c(n,:))<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> theta = n*2*pi\/k;<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> rot = makehgtform(ZRotate=theta);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"> set(t, Matrix=rot);<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\"><span style=\"color: #0e00ff;\">end<\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 0px none #000000; border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">axis <span style=\"color: #aa04f9;\">equal <\/span><\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-left: 1px solid #e9e9e9; border-right: 1px solid #e9e9e9; border-top: 0px none #000000; border-bottom: 1px solid #e9e9e9; border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: #000000; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;\"><span style=\"white-space: pre;\">axis <span style=\"color: #aa04f9;\">off<\/span><\/span><\/div>\n<div style=\"color: #404040; padding: 10px 0px 6px 17px; background: #ffffff none repeat scroll 0% 0% \/ auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;\">\n<div class=\"inlineElement eoOutputWrapper embeddedOutputsFigure\" style=\"width: 1146px;\" data-testid=\"output_15\">\n<div class=\"figureElement eoOutputContent\"><img decoding=\"async\" loading=\"lazy\" width=\"448\" height=\"336\" class=\"alignnone size-full wp-image-7974\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/minihack_20th_4-1.png\" alt=\"\" \/><\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><script type=\"text\/javascript\">var css = '.variableValue { width: 100% !important; } .embeddedOutputsMatrixElement,.eoOutputWrapper .matrixElement {    min-height: 18px;    box-sizing: border-box;} .embeddedOutputsMatrixElement .matrixElement,.eoOutputWrapper  .matrixElement,.rtcDataTipElement .matrixElement {    position: relative;} .matrixElement .variableValue,.rtcDataTipElement .matrixElement .variableValue {    white-space: pre;    display: inline-block;    vertical-align: top;    overflow: hidden;} .embeddedOutputsMatrixElement.inlineElement {} .embeddedOutputsMatrixElement.inlineElement .topHeaderWrapper {    display: none;} .embeddedOutputsMatrixElement.inlineElement .veTable .body {    padding-top: 0 !important;    max-height: 100px;} .inlineElement .matrixElement {    max-height: 300px;} .embeddedOutputsMatrixElement.rightPaneElement {} .rightPaneElement .matrixElement,.rtcDataTipElement .matrixElement {    overflow: hidden;    padding-left: 9px;} .rightPaneElement .matrixElement {    margin-bottom: -1px;} .embeddedOutputsMatrixElement .matrixElement .valueContainer,.eoOutputWrapper .matrixElement .valueContainer,.rtcDataTipElement .matrixElement .valueContainer {    white-space: nowrap;    margin-bottom: 3px;} .embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis.hide,.embeddedOutputsMatrixElement .matrixElement .verticalEllipsis.hide,.eoOutputWrapper .matrixElement .valueContainer .horizontalEllipsis.hide,.eoOutputWrapper .matrixElement .verticalEllipsis.hide,.rtcDataTipElement .matrixElement .valueContainer .horizontalEllipsis.hide,.rtcDataTipElement .matrixElement .verticalEllipsis.hide {    display: none;} .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer.hideEllipses .verticalEllipsis, .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer.hideEllipses .horizontalEllipsis {    display:none;} .embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis,.eoOutputWrapper .matrixElement .valueContainer .horizontalEllipsis {    margin-bottom: -3px;} .eoOutputWrapper .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer {    cursor: default !important;} .embeddedOutputsVariableElement {    white-space: pre-wrap;    word-wrap: break-word;    min-height: 18px;    max-height: 250px;    overflow: auto;} .variableElement {} .embeddedOutputsVariableElement.inlineElement {} .inlineElement .variableElement {} .embeddedOutputsVariableElement.rightPaneElement {    min-height: 16px;} .rightPaneElement .variableElement {    padding-top: 2px;    padding-left: 9px;} .variableNameElement {    margin-bottom: 3px;    display: inline-block;} \/* * Ellipses as base64 for HTML export. *\/.matrixElement .horizontalEllipsis,.rtcDataTipElement .matrixElement .horizontalEllipsis {    display: inline-block;    margin-top: 3px;    \/* base64 encoded version of images-liveeditor\/HEllipsis.png *\/    width: 30px;    height: 12px;    background-repeat: no-repeat;    background-image: url(\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAJCAYAAADO1CeCAAAAJUlEQVR42mP4\/\/8\/A70xw0i29BUDFPxnAEtTW37wWDqakIa4pQDvOOG89lHX2gAAAABJRU5ErkJggg==\");} .matrixElement .verticalEllipsis,.textElement .verticalEllipsis,.rtcDataTipElement .matrixElement .verticalEllipsis,.rtcDataTipElement .textElement .verticalEllipsis {    margin-left: 35px;    \/* base64 encoded version of images-liveeditor\/VEllipsis.png *\/    width: 12px;    height: 30px;    background-repeat: no-repeat;    background-image: url(\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAZCAYAAAAIcL+IAAAALklEQVR42mP4\/\/8\/AzGYgWyFMECMwv8QddRS+P\/\/KyimlmcGUOFoOI6GI\/UVAgDnd8Dd4+NCwgAAAABJRU5ErkJggg==\");}'; var head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); head.appendChild(style); style.type = 'text\/css'; if (style.styleSheet){ style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); }<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/minihack_20th_1-1.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>\nAs I said in my last post, here at the MathWorks Community blog we are currently celebrating an important milestone: MATLAB Central is 20 years old!<br \/>\nIt's a fine number, 20. Certain numbers just come... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2021\/09\/29\/twenty-a-birthday-a-contest-an-explosion-of-images\/\">read more >><\/a><\/p>\n","protected":false},"author":69,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/8001"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/users\/69"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/comments?post=8001"}],"version-history":[{"count":7,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/8001\/revisions"}],"predecessor-version":[{"id":8028,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/8001\/revisions\/8028"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=8001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=8001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=8001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}