Rank: 35 based on 1042 downloads (last 30 days) and 37 files submitted
photo

Bruno Luong

E-mail

Personal Profile:

Professional Interests:

 

Watch this Author's files

 

Files Posted by Bruno View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
29 Jun 2010 RANDSUBSET Return a random subset of k elements of the set of n elements Author: Bruno Luong permutation, randperm, without replacement, random, subset 37 1
23 Jun 2010 mmtimes: matrix chain product Return matrix chain product P = M1*M2* ... *Mn Author: Bruno Luong matrix product, associative, multiplication, chain, order 31 0
10 Jun 2010 Screenshot Free-knot spline approximation Least squares approximation of 1D data using free-knots spline Author: Bruno Luong bspline, free knots, least squares, knot removal, fitting, data compression 52 2
  • 4.0
4.0 | 1 rating
07 Jun 2010 Screenshot 2D polygon interior detection Detect a whereas a point is interior or exterior to a 2D polygon Author: Bruno Luong inside, mesh, polygon, inpolygon, geometry 41 2
28 May 2010 Small size linear solver Linear solver of multiple 2x2 and 3x3 systems Author: Bruno Luong matrix, determinant, cofactor, small systems, matrices, 2x2 10 2
Comments and Ratings by Bruno View all
Updated File Comments Rating
01 Jul 2010 Interval merging Merging intervals in the bracket form Author: Bruno Luong

Hi Xavier,

You could do this ([lower(i), upper(i)] will compose C):

Aleft=[0 6];
Aright=[2 9];
Bleft=[1 8];
Bright=[7 12];

iitersect = @(i,j) deal(max([Aleft(i) Bleft(j)]),min([Aright(i) Bright(j)]));
[I J]=ndgrid(1:numel(Aleft),1:numel(Bleft));
[left right]=arrayfun(iitersect, I, J);
[lower upper] = MergeBrackets(left, right);

Bruno

25 Jun 2010 RANDSUBSET Return a random subset of k elements of the set of n elements Author: Bruno Luong

For the moment, it is not recommended using this function for k larger than 1e4, since the insertion complexity is O(k^2), which is not optimal. I'll work for the better insertion algorithm for the next release.

08 Jun 2010 Free-knot spline approximation Least squares approximation of 1D data using free-knots spline Author: Bruno Luong

Just discover an issue with continuous regularization. In the mean time, please use the discrete regularization

07 Jun 2010 2D polygon interior detection Detect a whereas a point is interior or exterior to a 2D polygon Author: Bruno Luong

To Matt: this is algorithm designed for for generic polygons (as with INPOLYGON)

05 Jun 2010 Fast points-in-polygon test Fast test to determine points located inside general polygon regions. Should be significantly faster Author: Darren Engwirda

This is a quality code

Comments and Ratings on Bruno's Files View all
Updated File Comment by Comments Rating
31 Jul 2010 N-dimensional histogram Compute n-dimensional histogram Author: Bruno Luong Fripp, Matthias

About plotting the results:

Jaclyn, if you just want bars plotted for the pairwise densities of two variables (i.e., a plot with x and y axes corresponding to values of your variables, and vertical bars on the x,y grid, corresponding to the counts for each 2D bin), you can get that with hist3().

Will, if you want to plot weights for 3 variables as varying sizes of bubbles on an x,y,z grid, you can do something like this:

% get the histogram
[count edges mid loc] = histcn(vals);

% make a grid for plotting
[X Y Z]=ndgrid(edges{1}, edges{2}, edges{3});
X=X(:); Y=Y(:); Z=Z(:);

% calculate sizes so the most dense cell gets a value of 100
% also convert from volume to "area" (as if drawing a sphere with
% the right volume and cross-sectional area s)
s_scale = 100/(max(count(:))^(2/3));
s = count(:).^(2/3) * s_scale;
% convert any zeros to small numbers for scatter3
s(s==0)=realmin;

% plot the densities
fh=figure();
set(fh, 'Renderer', 'OpenGL'); % faster drawing
scatter3(X, Y, Z, s, 'filled');

26 Jul 2010 Multiple eigen-values for 2x2 and 3x3 matrices Compute in one shot the eigen-values of multiples (3 x 3) matrices using Cardan's formula Author: Bruno Luong Evans, Jeff

Excellent. Much faster than running eig in a for loop. Thanks!

23 Jul 2010 N-dimensional histogram Compute n-dimensional histogram Author: Bruno Luong Soravit

I really appreciate it. Great Work!!

23 Jul 2010 FFT-based convolution Discrete convolution using FFT method Author: Bruno Luong Eric

03 Jul 2010 Interval merging Merging intervals in the bracket form Author: Bruno Luong Xavier, Xavier

Thank you very much, this is working perfectly!

Regards
Xavier

Top Tags Applied by Bruno
geometry, matrix, array, linear algebra, permutation
Files Tagged by Bruno View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
29 Jun 2010 RANDSUBSET Return a random subset of k elements of the set of n elements Author: Bruno Luong permutation, randperm, without replacement, random, subset 37 1
23 Jun 2010 mmtimes: matrix chain product Return matrix chain product P = M1*M2* ... *Mn Author: Bruno Luong matrix product, associative, multiplication, chain, order 31 0
10 Jun 2010 Screenshot Free-knot spline approximation Least squares approximation of 1D data using free-knots spline Author: Bruno Luong bspline, free knots, least squares, knot removal, fitting, data compression 52 2
  • 4.0
4.0 | 1 rating
07 Jun 2010 Screenshot 2D polygon interior detection Detect a whereas a point is interior or exterior to a 2D polygon Author: Bruno Luong inside, mesh, polygon, inpolygon, geometry 41 2
28 May 2010 Small size linear solver Linear solver of multiple 2x2 and 3x3 systems Author: Bruno Luong matrix, determinant, cofactor, small systems, matrices, 2x2 10 2

Contact us at files@mathworks.com