Rank: 114298 based on 0 downloads (last 30 days) and 0 file submitted

Ryan Muir


Personal Profile:


Watch this Author's files


Comments and Ratings by Ryan Muir View all
Updated File Comments Rating
31 Jan 2014 Inpaint over missing data in 1-D, 2-D, 3-D,... N-D arrays Y = INPAINTN(X) computes the missing data in the N-D array X. Author: Damien Garcia

This is a great program! It is easy to use, and is really impressively fast.

I was using it for 3D and 4D interpolation of rather large problems, and was taking hours per image to process. I found that I could offload much of the problem to the GPUs, and get an order of magnitude more speed with a couple of lines of extra code! It's a bit sloppy, but putting y = gpuArray(y) near the beginning of the cdtn() and icdtn() functions bought me this performance enhancement. There are likely more efficient and elegant ways of sending it to the GPU, though this way worked great in a pinch. Small problems (including the example problem) run a bit slower with this modification, so this really is for large problems only.

18 Nov 2013 Quicker 1D linear interpolation: interp1qr Same functionality as built-in MATLAB function 'interp1q' but 3x faster. Author: Jose M. Mier

Works well!

29 Oct 2013 LBFGSB (L-BFGS-B) mex wrapper Mex wrapper for lbfgsb v3.0 fortan library. L-bfgs-b solves box-constrained optimization. Author: Stephen Becker

13 Feb 2012 Fast Convolution Convolves two extremely large vectors in reasonable time. Author: Stephen McGovern

This function normalizes the output, which I did not want. Commenting out the last line in the script took care of that (the program is only 10 or 15 lines long). After that, this generated output that is identical to the native conv() function, and did it orders of magnitude faster. Thanks! =)

23 Jul 2011 LMFnlsq - Solution of nonlinear least squares Efficient and stable Levenberg-Marquard-Fletcher method for solving of nonlinear equations Author: Miroslav Balda

Works fast and well! However, it has a HUGE learning curve if you don't write code at a very high level...the included examples I found to be less than completely understandable to me, and don't work unless you know how to use them. Instead, here is a VERY SIMPLE program that uses this algorithm to fit a function to a simulated dataset. I took it and modified it from a forum post elsewhere on the internets. Recall that chi^2 = sum(((x - mu)/sigma).^2), and the point of this function is to determine what parameters in mu minimize chi^2:

% Ender 2008-07-08
a = 10, b = -8, c = -.2 %Model parameters
t = (0:.01:1)'; %should be a column vector

data = a + b*(1-exp(t/c)) + .1*randn(size(t)); %Function plus random error; simulates data

res = @(x) data - (x(1) + x(2)*(1-exp(t/x(3))) ); %Numerator of chi^2, with quantity squared implied for fitting in LMFnlsq; also known as residuals

x0 = [5,3,-.1]; %rather poor initial guess of parameters

[x,ssq,cnt] = LMFnlsq(res,x0) %Returns the parameter values which minimized the value of the numerator

%Plot the data
hold on
plot(t,(x(1) + x(2)*(1-exp(t/x(3)))),'r'), grid

Contact us