Search Comments and Ratings

go

   
Date File Comment by Comment Rating
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. Author: Anthony Kendall 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. Author: John Evans 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 Author: Wolfgang Schwanghart 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. Author: Aslak Grinsted 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 Author: Anthony Kendall 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. Author: Anthony Kendall 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. Author: Anthony Kendall 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 Author: Darin Koblick 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. Author: Anthony Kendall 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.

Thanks for your comments.

08 Feb 2009 waitbar with time estimation Estimated remaining, elapsed time, and percentage complete. Author: Andrew 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. Author: Robert Henson Anthony Kendall

Very handy and lightweight set of functions. Thank you!

To answer some questions:
1) actxserver is a MATLAB function found only in Windows
2) make sure you install the R-(D)COM interface, paying attention to the instructions about setting your R_HOME and PATH variables in the environment variables for your system. I received this same error, but once I restarted my machine and set the paths (and restarted MATLAB) it worked just fine.

Contact us