File Comment by Comment
16 Apr 2010 Determine and count unique values of an array Very fast function to determine and count unique values of numeric, logical, char, cell arrays. Anthony Kendall

Matt - The N that you refer to is simply the second output of this routine, you just need to request it.

Kristi - Thanks! That helped speed up large integer arrays considerably. I've updated the file to reflect your suggestions.

08 Mar 2010 MEX_SHAPE Reads in common ESRI shapefile formats. Anthony Kendall

The code worked great, I compiled it on a 64-bit machine with the latest version of shapelib, and everything works well. Some of the help is a bit outdated, but I really can't complain.

26 Feb 2010 Experimental (Semi-) Variogram calculate the isotropic and anisotropic experimental (semi-) variogram Anthony Kendall

Thanks a lot for this function, it works very well (though as you mentioned it is a bit of a memory hog, I had to subsample my data but the variogram was robust).

19 Feb 2010 Surfer Griddata A gridding interface with surfer (v7). Works just like griddata. Anthony Kendall

Nice, simple function that can easily be modified to add additional options to the interpolations. Thanks!

04 Nov 2009 Recursive addpath Recursively adds directories to MATLAB path, optionally ignores some Anthony Kendall

Thanks Jim!

I made that change for compatibility with Macs. Also, based on your first comment back in October I increased the speed of the code by a factor of 3 in a moderate-sized directory tree.

28 Apr 2009 Date to Decimal Day of Year Convert a vector of MATLAB serial dates to decimal days since the start of the year. Anthony Kendall

Ashley,
Not sure why FEX didn't have the date2doy. Should have been updated last January 18th, but something must have gone wrong there. I resubmitted the function.

21 Mar 2009 Determine and count unique values of an array Very fast function to determine and count unique values of numeric, logical, char, cell arrays. Anthony Kendall

Bruno,
Thanks for making this point. This can be addressed by specifying the 'float' option in count_unique. However, I've added also added a check that when the maximum value of the input array is much greater than its number of elements, accumarray is not used.

I ran your example on the unmodified code, and got results similar to yours. Now, on the modified code (without specifying the 'float' option, which does not use accumarray), the run times are both trivial in your example. The change increased run times for large array integer values slightly, and the description above is modified to reflect that.

Thanks again.

19 Mar 2009 Vectorized Solar Azimuth and Elevation Estimation Predict the topocentric solar position defined by geodetic lat, lon, Alt, and a universal time Anthony Kendall

Excellent function, it's fast, compact, and easily modified for my particular needs. Thank you very much! BTW, I compared it with sun position tables, (http://www.srrb.noaa.gov/highlights/sunrise/azel.html) and it does very well.

18 Mar 2009 Determine and count unique values of an array Very fast function to determine and count unique values of numeric, logical, char, cell arrays. Anthony Kendall

John,
The code is primarily used to count the number of each unique instance within an array, but as a side benefit is slightly faster than the existing unique function (and quite a bit faster for integer-valued arrays). I'll modify the description to make this more obvious.

08 Feb 2009 waitbar with time estimation Estimated remaining, elapsed time, and percentage complete. Anthony Kendall

Very nice, though there is one bug that shows up in the provided example: the message is overwritten with the graphics handle

A fix I used is:
line 45: h = message;
becomes
line 45: h = message; message = [];

And, in the subfunction updatewaitbar:
line 143: set(hh.message,'String',message);
becomes
line 145: if ~isempty(message),set(hh.message,'String',message);end

Otherwise, it works great and is a complete drop-in replacement for waitbar. Thanks!

04 Dec 2008 MATLAB R-link Functions for calling the statistical package R from within MATLAB. Anthony Kendall

Very handy and lightweight set of functions. Thank you!