{"id":20,"date":"2006-01-17T07:00:13","date_gmt":"2006-01-17T12:00:13","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/?p=20"},"modified":"2019-10-21T17:39:48","modified_gmt":"2019-10-21T21:39:48","slug":"matlabs-publish-function","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2006\/01\/17\/matlabs-publish-function\/","title":{"rendered":"MATLAB&#8217;s publish function"},"content":{"rendered":"<p>\r\nHave you discovered the Publish to HTML functionality in MATLAB 7 yet? If not, you should definitely check it out.\r\n<\/p>\r\n\r\n<p>\r\nI generated the HTML for my recent blog entry, <a href=\"?p=19\">Synthesizing images using simple equations<\/a>, directly from an M-file script.\r\n<\/p>\r\n\r\n<p>\r\nFor example, the <a href=\"?p=19#1\">\"Start with meshgrid\"<\/a> section was generated from this part of the M-file:\r\n<\/p>\r\n\r\n<pre class=\"code\">\r\n%% Start with meshgrid\r\n% The MATLAB function |meshgrid| is extremely useful for computing a\r\n% function of two Cartesian coordinates, and you can make some interesting\r\n% images this way.\r\n%\r\n% |meshgrid| is kind of hard to explain in words.  It's easier to just look \r\n% at what it does.\r\n\r\nx = 1:3;\r\ny = 10:14;\r\n[xx, yy] = meshgrid(x, y)\r\n<\/pre>\r\n\r\n<p>\r\nOutput in the command window is automatically captured and included in the generated HTML, and any figures created are also captured and stored as image files.\r\n<\/p>\r\n\r\n<p>\r\nIn addition to HTML, you can also publish to Word, to LaTeX, to PowerPoint, or to XML.\r\n<\/p>\r\n\r\n<p>\r\nRead more about this MATLAB feature in the Users Guide. You should also check out Loren Shure's <a href=\"https:\/\/blogs.mathworks.com\/loren\">Art of MATLAB blog<\/a> on <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/\">MATLAB Central<\/a>.\r\n<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>\r\nHave you discovered the Publish to HTML functionality in MATLAB 7 yet? If not, you should definitely check it out.\r\n\r\n\r\n\r\nI generated the HTML for my recent blog entry, Synthesizing images using... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/01\/17\/matlabs-publish-function\/\">read more >><\/a><\/p>","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[40],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/20"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/comments?post=20"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"predecessor-version":[{"id":2146,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/20\/revisions\/2146"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}