{"id":6068,"date":"2019-02-13T18:44:48","date_gmt":"2019-02-13T23:44:48","guid":{"rendered":"https:\/\/blogs.mathworks.com\/community\/?p=6068"},"modified":"2019-02-13T18:44:48","modified_gmt":"2019-02-13T23:44:48","slug":"why-you-should-date-someone-who-knows-matlab","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/community\/2019\/02\/13\/why-you-should-date-someone-who-knows-matlab\/","title":{"rendered":"Why You Should Date Someone Who Knows MATLAB"},"content":{"rendered":"<p>Happy Valentines Day! I have been working with the MATLAB community since we launched MATLAB Central wa-aaay back at the beginning of this century. On more than one occasion we have been asked to consider some sort of matchmaking service on the site. While we never acted on this interesting proposition, it does lead to a certain line of reasoning. Namely, what are the romantic possibilities of MATLAB?<\/p>\n<p>With this in mind, we present herewith (and wholly tongue in cheek), ten reasons why you should consider dating someone with a working knowledge of MATLAB.<\/p>\n<p>Please don&#8217;t take them too seriously&#8230;<\/p>\n<h3>Number 1.<\/h3>\n<p>With one-based indexing, you\u2019ll always be number one in their heart, never zero.<\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\">u = [1 2 3 4]\r\nu(1)\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">ans = 1\r\n<\/pre>\n<h3>Number 2.<\/h3>\n<p>They can make emoji out of working code. Sort of like making balloon animals.<\/p>\n<p>See the second line below? It reports the first column of the matrix A. Is that just standard MATLAB code? Or is it&#8230; <em>a little miner guy with a lamp on his helmet and a turned up nose?<\/em><\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\">A = invhilb(4);\r\nA(:,1)\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">ans = <em>4\u00d71<\/em>\r\n\r\n    16\r\n  -120\r\n   240\r\n  -140\r\n\r\n<\/pre>\n<h3>Number 3.<\/h3>\n<p>They know how to get abs of steel. Like this.<\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\">steel = -17;\r\nabs(steel)\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">ans = 17\r\n<\/pre>\n<h3>Number 4.<\/h3>\n<p>They know that being prompt is good, but double prompt is even better.<\/p>\n<pre>&gt;&gt;<\/pre>\n<h3>Number 5.<\/h3>\n<p>They know how to give you a seal of approval. Or at least a ceil of approval. Like this.<\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\">approval = pi;\r\nceil(approval)\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">ans = 4\r\n<\/pre>\n<h3>Number 6.<\/h3>\n<p>They know how to get their ducks in a row. Like this.<\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\"><span style=\"color: #228b22;\">% ducks in a (Moler) matrix<\/span>\r\nducks =  gallery(<span style=\"color: #a020f0;\">'moler'<\/span>,3)\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">ducks = <em>3\u00d73<\/em>\r\n\r\n     1    -1    -1\r\n    -1     2     0\r\n    -1     0     3\r\n\r\n<\/pre>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\"><span style=\"color: #228b22;\">% ducks in a row<\/span>\r\nducks(:)'\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">ans = <em>1\u00d79<\/em>\r\n\r\n     1    -1    -1    -1     2     0    -1     0     3\r\n\r\n<\/pre>\n<h3>Number 7.<\/h3>\n<p>They can draw you a heart (<a href=\"https:\/\/blogs.mathworks.com\/cleve\/2018\/02\/14\/happy-valentines-day\/\">thanks Cleve<\/a>!). Like this.<\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\">h = ezplot(<span style=\"color: #a020f0;\">'(x^2+y^2-1)^3 = x^2*y^3'<\/span>, <span style=\"color: #0000ff;\">...<\/span>\r\n   [-1.5,1.5,-1.2,1.5]);\r\nh.LineWidth = 5;\r\ncolormap([1 0 0])\r\n<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/valentines_1.png\" \/><\/p>\n<h3>Number 8.<\/h3>\n<p>They have magic built right in. Try it!<\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\"><span style=\"color: #228b22;\">% You are the one<\/span>\r\nu = 1;\r\n<span style=\"color: #228b22;\">% Here is magic for you<\/span>\r\nmagic(4*u)\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">ans = <em>4\u00d74<\/em>\r\n\r\n    16     2     3    13\r\n     5    11    10     8\r\n     9     7     6    12\r\n     4    14    15     1\r\n\r\n<\/pre>\n<h3>Number 9.<\/h3>\n<p>They know how to make room for you in their life.<\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\"><span style=\"color: #228b22;\">% Nothing else matters<\/span>\r\nclose <span style=\"color: #a020f0;\">all<\/span>; clear <span style=\"color: #a020f0;\">all<\/span>\r\n<span style=\"color: #228b22;\">% You are everything<\/span>\r\nu = inf\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">u = Inf\r\n<\/pre>\n<h3>Number 10.<\/h3>\n<p>MATLAB is for lovers. And if you want to know why, they always have an answer ready.<\/p>\n<pre id=\"matlabcode\" class=\"matlab-code\" style=\"background-color: #f7f7f7; font-family: monospace; font-weight: normal; padding-top: 5px; padding-bottom: 5px; line-height: 150%; border: 1px solid #E9E9E9;\">why\r\n<\/pre>\n<pre class=\"output\" style=\"font-family: monospace; border: none; background-color: white; color: rgba(64, 64, 64, 1);\">For the love of a smart and terrified mathematician.\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/community\/files\/valentines_1.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>Happy Valentines Day! I have been working with the MATLAB community since we launched MATLAB Central wa-aaay back at the beginning of this century. On more than one occasion we have been asked to&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/community\/2019\/02\/13\/why-you-should-date-someone-who-knows-matlab\/\">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\/6068"}],"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=6068"}],"version-history":[{"count":4,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/6068\/revisions"}],"predecessor-version":[{"id":6078,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/posts\/6068\/revisions\/6078"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/media?parent=6068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/categories?post=6068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/community\/wp-json\/wp\/v2\/tags?post=6068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}