{"id":90,"date":"2006-10-20T10:31:56","date_gmt":"2006-10-20T15:31:56","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/?p=90"},"modified":"2006-10-20T10:31:56","modified_gmt":"2006-10-20T15:31:56","slug":"getting-matlab-code-from-blog-postings","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2006\/10\/20\/getting-matlab-code-from-blog-postings\/","title":{"rendered":"Getting MATLAB code from blog postings"},"content":{"rendered":"<p>\r\nBack in January, I <a href=\"https:\/\/blogs.mathworks.com\/steve\/?p=20\">wrote<\/a> that I was using the MATLAB publish feature to generate some of my blog posts. Since then, I've used publish for almost every post.  I write my post as a MATLAB script, and then I use publish to turn the script into a web page. Command window output and figure screenshots are automatically captured.\r\n<\/p>\r\n\r\n<p>\r\nThis week, a few of us in development have been experimenting with using Javascript to make it easy to grab the MATLAB script code when you are looking at a web page published by MATLAB.  It now seems to be working well enough to tell you about it and to invite you to try it.\r\n<\/p>\r\n\r\n<p>\r\nLook near the bottom of my two previous posts (about the <a href=\"https:\/\/blogs.mathworks.com\/steve\/?p=89\">Hough transform<\/a> and about the <a href=\"https:\/\/blogs.mathworks.com\/steve\/?p=87\">MATLAB default image<\/a>). Just above the \"Published with MATLAB 7.3\" line on the right, you'll see a new link that says \"Get the MATLAB code.\"  If you click on that link, my original MATLAB script will pop up in a new window. You can then copy-and-paste the code into your own M-file and run it yourself.\r\n<\/p>\r\n\r\n<p>\r\nPlease let me know what you think about this.  Depending on the feedback I get, I may go back through my old blog posts and add in this link.  Also, Loren may also start doing this soon in her <a href=\"https:\/\/blogs.mathworks.com\/loren\">Art of MATLAB<\/a> blog, so she'll be interested in your feedback, too.\r\n<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>\r\nBack in January, I wrote that I was using the MATLAB publish feature to generate some of my blog posts. Since then, I've used publish for almost every post.  I write my post as a MATLAB script, and... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/10\/20\/getting-matlab-code-from-blog-postings\/\">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":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/90"}],"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=90"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}