Do you know of any differences between these files and yours?
Darren
18 Nov 2010
diffxy
Second-order accurate numerical differentiation (N-dimensional)
Author: Darren Rowland
@ Carlos,
Yes this will handle equally spaced data too. The formula I have used reduces to the central difference formula when the data are equally spaced, so the result is mostly the same as GRADIENT in that case.
The first example in the file demo_diffxy demonstrates the case of equally spaced points (follow the link next to 'Published MATLAB Files' above to view).
Darren
This submission can't be used in its current form as it appears to be missing some functions.
There are also 44 M-lint messages, mostly relating to variables which are set but never used.
@ Carlos,
Yes this will handle equally spaced data too. The formula I have used reduces to the central difference formula when the data are equally spaced, so the result is mostly the same as GRADIENT in that case.
The first example in the file demo_diffxy demonstrates the case of equally spaced points (follow the link next to 'Published MATLAB Files' above to view).
Darren
16 Nov 2010
diffxy
Second-order accurate numerical differentiation (N-dimensional)
Author: Darren Rowland
I noticed that you specified that this file was made to handle unequally spaced data but, I was wondering if it can also handle equally spaced data? Thank you.
24 Mar 2010
ONECOMB
Obtain a single combination of N numbers taken K at a time.
Author: Darren Rowland
It is exactly correct that this function with call structure
C1 = onecomb(N,K,M)
returns the same result as
AC = nchoosek(N,K);
C2 = AC(M,:)
The advantage of this function is that the intermediate array AC is not computed by ONECOMB. The array AC can be immensely large for large N and K approx N/2, and is a waste to compute if one only requires a small number of combinations from the total.
Additionally, if one requires many combinations, my testing (not included here but simple to duplicate) showed that the time to compute all the combinations using NCHOOSEK was approximately the same as computing all the combinations one-at-a-time using ONECOMB.