{"id":7791,"date":"2016-08-19T09:00:54","date_gmt":"2016-08-19T13:00:54","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=7791"},"modified":"2016-08-18T08:40:13","modified_gmt":"2016-08-18T12:40:13","slug":"the-oldest-file","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2016\/08\/19\/the-oldest-file\/","title":{"rendered":"The Oldest File"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p>In honor of <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/anniversary\/?s_tid=MLC15YA\">MATLAB Central's 15th anniversary this week<\/a>, <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495\">Sean<\/a>'s picks this week are the two \"oldest\" files on the File Exchange.\r\n      <\/p>\r\n   <\/introduction>\r\n   <h3>Contents<\/h3>\r\n   <div>\r\n      <ul>\r\n         <li><a href=\"#1\">\"First\"<\/a><\/li>\r\n         <li><a href=\"#2\">\"Oldest\"<\/a><\/li>\r\n         <li><a href=\"#4\">Background<\/a><\/li>\r\n         <li><a href=\"#5\">Comments<\/a><\/li>\r\n      <\/ul>\r\n   <\/div>\r\n   <h3>\"First\"<a name=\"1\"><\/a><\/h3>\r\n   <p>Every File Exchange entry has an id that you can reference it with. These ids continue to increase as new files arrive on\r\n      the File Exchange with the 58671st arriving just now.\r\n   <\/p>\r\n   <p>Thus is seems that the \"first\" file on the File Exchange might be the one with the lowest id.  I did a quick binary search\r\n      typing in URLs with low ids and discovered that 12 was the lowest index on the File Exchange. At one point, there was a file\r\n      at 11, but it has since been deleted.\r\n   <\/p>\r\n   <p>So what is file 12?  It's <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/12-central-diff-m\">central_diff<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/45368\">Robert Canfield<\/a>.  This file was originally submitted on October 27th, 2000 and actually most recently updated, last year or 15 years later,\r\n      to make it more accurate!\r\n   <\/p>\r\n   <p>This file computes the derivative of a vector using a second order central difference.  Here's a quick example:<\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">x = linspace(-2*pi,2*pi,1000);\r\nf = sin(x);\r\ndfdx = central_diff(f,x);\r\nplot(x,y,x,dfdx)\r\naxis <span style=\"color: #A020F0\">tight<\/span>\r\nxlabel(<span style=\"color: #A020F0\">'x'<\/span>)\r\nlegend({<span style=\"color: #A020F0\">'$f(x)$'<\/span>, <span style=\"color: #A020F0\">'$\\frac{dF}{dx}$'<\/span>}, <span style=\"color: #A020F0\">'Interpreter'<\/span>, <span style=\"color: #A020F0\">'latex'<\/span>)<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainOldestFile\/mainOldestFile_01.png\"> <h3>\"Oldest\"<a name=\"2\"><\/a><\/h3>\r\n   <p>But is it really the oldest?<\/p>\r\n   <p>There are different ways to sort results on the File Exchange and one is by <i>\"Date Submitted (Oldest - Newest)\"<\/i>.\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainOldestFile\/oldsearch.png\"> <\/p>\r\n   <p>Looking at the oldest one, it's <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/58-routh-m\">routh<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869225\">Edmundo Rivera-Santos<\/a>.  This file has an index of 58 but was submitted on January 30, 1997!\r\n   <\/p>\r\n   <p>It seems this is truly the oldest file.  And it still runs almost two decades later in R2016a!<\/p>\r\n   <p><i><b>NOTE<\/b> There is no BSD license so use at your own risk.<\/i><\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">syms <span style=\"color: #A020F0\">a<\/span> <span style=\"color: #A020F0\">b<\/span> <span style=\"color: #A020F0\">c<\/span> <span style=\"color: #A020F0\">EPS<\/span>\r\nra=routh([1 a b c],EPS)<\/pre><pre style=\"font-style:oblique\">ra =\r\n[            1, b]\r\n[            a, c]\r\n[ -(c - a*b)\/a, 0]\r\n[            c, 0]\r\n<\/pre><p>It's also great that both of these files happen to have the characteristics of a pick of the week.  They have good: help,\r\n      error checking, comments and examples which I'm sure have been used hundreds or thousands of times over the years.\r\n   <\/p>\r\n   <h3>Background<a name=\"4\"><\/a><\/h3>\r\n   <p>So why does routh precede central_diff in age but not index?  I reached out to <a href=\"https:\/\/blogs.mathworks.com\/community\/\">Ned<\/a> to find out.\r\n   <\/p>\r\n   <p>Before there was a File Exchange, there was an FTP site where files could be shared.  Ned provided this antique screen shot\r\n      of that FTP site; the files were in the \"contrib\" folder:\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainOldestFile\/oldftp.png\"> <\/p>\r\n   <p>When the File Exchange was created, the FTP files were not immediately migrated.  Thus the first files posted to the File\r\n      Exchange got lower ids.\r\n   <\/p>\r\n   <h3>Comments<a name=\"5\"><\/a><\/h3>\r\n   <p>Give them a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=7791#respond\">here<\/a> or leave a congratulatory comment for the authors of <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/58-routh-m#comments\">routh<\/a> or  <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/12-central-diff-m#comments\">central_diff<\/a>.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_0abfd8b5757f4aa1aba6bbb1155c6cee() {\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='0abfd8b5757f4aa1aba6bbb1155c6cee ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 0abfd8b5757f4aa1aba6bbb1155c6cee';\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        author = 'Sean de Wolski';\r\n        copyright = 'Copyright 2016 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_0abfd8b5757f4aa1aba6bbb1155c6cee()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2016a<br><\/p>\r\n<\/div>\r\n<!--\r\n0abfd8b5757f4aa1aba6bbb1155c6cee ##### SOURCE BEGIN #####\r\n%% The Oldest File\r\n%\r\n% In honor of\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/anniversary\/?s_tid=MLC15YA MATLAB\r\n% Central's 15th anniversary>,\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495 Sean>'s\r\n% picks this week are the two \"oldest\" files on the File Exchange.\r\n\r\n%% \"First\"\r\n% Every File Exchange entry has an id that you can reference it with. These\r\n% ids continue to increase as new files arrive on the File Exchange with\r\n% the 58671st arriving just now.\r\n%  \r\n% Thus is seems that the \"first\" file on the File Exchange might be the\r\n% one with the lowest id.  I did a quick binary search typing in URLs with\r\n% low ids and discovered that 12 was the lowest index on the File Exchange.\r\n% At one point, there was a file at 11, but it has since been deleted.  \r\n%\r\n% So what is file 12?  It's\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/12-central-diff-m central_diff> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/45368 Robert\r\n% Canfield>.  This file was originally submitted on October 27th, 2000 and\r\n% actually most recently updated, last year or 15 years later, to make it\r\n% more accurate!\r\n% \r\n% This file computes the derivative of a vector using a second order\r\n% central difference.  Here's a quick example:\r\n\r\nx = linspace(-2*pi,2*pi,1000);\r\nf = sin(x);\r\ndfdx = central_diff(f,x);\r\nplot(x,y,x,dfdx)\r\naxis tight\r\nxlabel('x')\r\nlegend({'$f(x)$', '$\\frac{dF}{dx}$'}, 'Interpreter', 'latex')\r\n\r\n%% \"Oldest\"\r\n% But is it really the oldest?\r\n%\r\n% There are different ways to sort results on the File Exchange and one is\r\n% by _\"Date Submitted (Oldest - Newest)\"_.\r\n%\r\n% <<oldsearch.png>>\r\n%\r\n% Looking at the oldest one, it's\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/58-routh-m routh> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/869225 Edmundo\r\n% Rivera Santos>.  This file has an index of 58 but was submitted on\r\n% January 30, 1997!\r\n%\r\n% It seems this is truly the oldest file.  And it still runs in R2016a!\r\n% \r\n% _*NOTE* There is no BSD license so use at your own risk._\r\n\r\nsyms a b c EPS\r\nra=routh([1 a b c],EPS)\r\n\r\n%%\r\n% It's also great that both of these files happen to have the\r\n% characteristics of a pick of the week.  They have good: help, error\r\n% checking, comments and examples which I'm sure have been used hundreds or\r\n% thousands of times over the years.\r\n\r\n%% Background\r\n% So why does routh precede central_diff in age but not index?  I reached\r\n% out to <https:\/\/blogs.mathworks.com\/community\/ Ned> to find out.\r\n%\r\n% Before there was a File Exchange, there was an FTP site where files could\r\n% be shared.  Ned provided this antique screen shot of that FTP site, the\r\n% files were in the \"contrib\" folder:\r\n%\r\n% <<oldftp.png>>\r\n%\r\n% When the File Exchange was created, the FTP files were not immediately\r\n% migrated.  Thus the first files posted to the File Exchange got lower\r\n% ids.\r\n\r\n%% Comments\r\n% \r\n% Give them a try and let us know what you think\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=7791#respond here> or leave a\r\n% congratulatory comment for the authors of\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/58-routh-m#comments\r\n%  routh> or\r\n%  <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/12-central-diff-m#comments\r\n% central_diff>.\r\n\r\n##### SOURCE END ##### 0abfd8b5757f4aa1aba6bbb1155c6cee\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainOldestFile\/mainOldestFile_01.png\" onError=\"this.style.display ='none';\" \/><\/div><p>\r\n   \r\n      In honor of MATLAB Central's 15th anniversary this week, Sean's picks this week are the two \"oldest\" files on the File Exchange.\r\n      \r\n   \r\n   Contents\r\n   \r\n   ... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2016\/08\/19\/the-oldest-file\/\">read more >><\/a><\/p>","protected":false},"author":87,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/7791"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=7791"}],"version-history":[{"count":5,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/7791\/revisions"}],"predecessor-version":[{"id":7796,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/7791\/revisions\/7796"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=7791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=7791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=7791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}