Rank: 29 based on 1084 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
16 Aug 2010 mmtimes: matrix chain product Return matrix chain product P = M1*M2* ... *Mn Author: Bruno Luong matrix product, associative, multiplication, chain, order 49 3
  • 4.5
4.5 | 2 ratings
16 Aug 2010 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong quicksort, max, min, partial sort, selection, kthvalue 114 9
  • 5.0
5.0 | 5 ratings
12 Aug 2010 Truncated Gaussian Generate a pseudo-random vector X drawn from the truncated Gaussian distribution Author: Bruno Luong gaussian, truncated, normal, pdf, distribution, random 81 6
  • 5.0
5.0 | 2 ratings
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 10 1
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 50 2
  • 4.0
4.0 | 1 rating
Comments and Ratings by Bruno View all
Updated File Comments Rating
27 Aug 2010 mmtimes: matrix chain product Return matrix chain product P = M1*M2* ... *Mn Author: Bruno Luong

Dear Derek,
Great educational writing, I enjoy reading it a lot.
Yes, the complexity of the implemented code is not optimal. It's still perfectly alright for product of less than 10 matrices, which is sufficient in most of the practical use. When I have time I'll take a look at methods based on non-overlapping polygonal partition.

16 Aug 2010 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong

Joschua, thanks for the report. I have correct the code and hopefully it resolves these two issues.

12 Aug 2010 Truncated Gaussian Generate a pseudo-random vector X drawn from the truncated Gaussian distribution Author: Bruno Luong

Thanks, Ze I made some correction to the code. The new version is available.

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.

Comments and Ratings on Bruno's Files View all
Updated File Comment by Comments Rating
27 Aug 2010 mmtimes: matrix chain product Return matrix chain product P = M1*M2* ... *Mn Author: Bruno Luong Luong, Bruno

Dear Derek,
Great educational writing, I enjoy reading it a lot.
Yes, the complexity of the implemented code is not optimal. It's still perfectly alright for product of less than 10 matrices, which is sufficient in most of the practical use. When I have time I'll take a look at methods based on non-overlapping polygonal partition.

27 Aug 2010 mmtimes: matrix chain product Return matrix chain product P = M1*M2* ... *Mn Author: Bruno Luong O'Connor, Derek

Dear Bruno,

Great stuff.

I have found that most mathematicians and 'numerical' people do not know that the <<complexity>> of matrix chain multiplication is not associative. Here is a Matlab exercise I gave to students 5 years ago to demonstrate this point:

http://www.scribd.com/derekroconnor4276

or

http://www.scribd.com/doc/36488330/Matrix-Chain-Multiplication

My mathematical friends liked this exercise and were very impressed that the solution to the optimum ordering involved Catalan Numbers. Also, they pointed out that these numbers did not come from Catalonia.

I agree with Ged Ridgway's comments and thank him for the pointer to a more efficient algorithm.

Derek O'Connor

Donard, Co Wicklow, Ireland.

16 Aug 2010 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong Dillon, Joshua

resolved. thanks!

16 Aug 2010 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong Luong, Bruno

Joschua, thanks for the report. I have correct the code and hopefully it resolves these two issues.

15 Aug 2010 Truncated Gaussian Generate a pseudo-random vector X drawn from the truncated Gaussian distribution Author: Bruno Luong Yu, summersyu

Dear Bruno,

Thank you for your answer. Following is my understanding:

 [X meaneffective sigmaeffective] = TruncatedGaussian(...)
If meaneffective is 5, but I want the mean to be 15.
Then shift=10
X = shift + TruncatedGaussian(sigma, range-shift, ...)

This is how we generate random variables from truncated normal distribution with mean 15, variance sigmaeffective and range [a,b].

But what is the CDF of a random variable from truncated normal distribution?

Let y be the cdf of a truncated normal variable x, then is the following equation right? I am not sure of the mean and variance in normcdf

y = (normcdf(x) - normcdf(a)) ./ (normcdf(b) - normcdf(a))

 

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
16 Aug 2010 mmtimes: matrix chain product Return matrix chain product P = M1*M2* ... *Mn Author: Bruno Luong matrix product, associative, multiplication, chain, order 49 3
  • 4.5
4.5 | 2 ratings
16 Aug 2010 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong quicksort, max, min, partial sort, selection, kthvalue 114 9
  • 5.0
5.0 | 5 ratings
12 Aug 2010 Truncated Gaussian Generate a pseudo-random vector X drawn from the truncated Gaussian distribution Author: Bruno Luong gaussian, truncated, normal, pdf, distribution, random 81 6
  • 5.0
5.0 | 2 ratings
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 10 1
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 50 2
  • 4.0
4.0 | 1 rating

Contact us at files@mathworks.com