File Exchange Pick of the Week

Our best user submissions

The Oldest File

In honor of MATLAB Central's 15th anniversary this week, Sean's picks this week are the two "oldest" files on the File Exchange.

Contents

"First"

Every File Exchange entry has an id that you can reference it with. These ids continue to increase as new files arrive on the File Exchange with the 58671st arriving just now.

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 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 at 11, but it has since been deleted.

So what is file 12? It's central_diff by Robert Canfield. This file was originally submitted on October 27th, 2000 and actually most recently updated, last year or 15 years later, to make it more accurate!

This file computes the derivative of a vector using a second order central difference. Here's a quick example:

x = linspace(-2*pi,2*pi,1000);
f = sin(x);
dfdx = central_diff(f,x);
plot(x,y,x,dfdx)
axis tight
xlabel('x')
legend({'$f(x)$', '$\frac{dF}{dx}$'}, 'Interpreter', 'latex')

"Oldest"

But is it really the oldest?

There are different ways to sort results on the File Exchange and one is by "Date Submitted (Oldest - Newest)".

Looking at the oldest one, it's routh by Edmundo Rivera-Santos. This file has an index of 58 but was submitted on January 30, 1997!

It seems this is truly the oldest file. And it still runs almost two decades later in R2016a!

NOTE There is no BSD license so use at your own risk.

syms a b c EPS
ra=routh([1 a b c],EPS)
ra =
[            1, b]
[            a, c]
[ -(c - a*b)/a, 0]
[            c, 0]

It's also great that both of these files happen to have the characteristics of a pick of the week. They have good: help, error checking, comments and examples which I'm sure have been used hundreds or thousands of times over the years.

Background

So why does routh precede central_diff in age but not index? I reached out to Ned to find out.

Before there was a File Exchange, there was an FTP site where files could be shared. Ned provided this antique screen shot of that FTP site; the files were in the "contrib" folder:

When the File Exchange was created, the FTP files were not immediately migrated. Thus the first files posted to the File Exchange got lower ids.

Comments

Give them a try and let us know what you think here or leave a congratulatory comment for the authors of routh or central_diff.




Published with MATLAB® R2016a

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.