Rank: 34 based on 1188 downloads (last 30 days) and 28 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
02 Feb 2010 Consecutive vector spliter Partition an input vector into smaller series of subvectors of consecutive elements Author: Bruno Luong split vectors, array, cell 52 3
  • 5.0
5.0 | 3 ratings
10 Jan 2010 Sparse sub access This package allows to retrieve and assign values of sparse matrix in one shot. Author: Bruno Luong large size, matrix, spfun, sparse, sub indexing, update 53 10
  • 5.0
5.0 | 4 ratings
10 Jan 2010 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong max, min, quicksort, kthvalue, selection, partial sort 62 4
  • 5.0
5.0 | 3 ratings
14 Dec 2009 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 61 0
  • 4.0
4.0 | 1 rating
01 Dec 2009 Min/Max filter Multidimensional non-linear min/max filtering Author: Bruno Luong dilatation, running min, running max, erosion, pattern recognition, filtering 94 0
Comments and Ratings by Bruno View all
Updated File Comments Rating
13 Mar 2010 Conjugate gradient To solve Ax=b - input: A, b, x0 (initial guess), ni (number of iteration) - output: x Author: shaoying

No H1 line, no comment, no possibility to adjust convergence criteria, no error checking. Matlab has already stock PCG function. What is the use of such function here?

09 Mar 2010 ISMEMBERF Floating-point ISMEMBER (i.e., with round-off tolerance) Author: Bruno Luong

Hi Oleg,

This behavior is known (but not documented) due to the use of HISTC as you have correctly pointed out. User should never rely on the threshold tolerance in order to discriminate floats through exact comparison. Please enlarge the tolerance or add point to set member to work around.

Bruno

04 Mar 2010 Sparse sub access This package allows to retrieve and assign values of sparse matrix in one shot. Author: Bruno Luong

Hello H,

I can't really help with memory problem. The suggestion I can give is to try on your side to increase the free largest memory block from other places. Thanks for the kind words.

Bruno

01 Mar 2010 XSum Fast Sum with error compensation Author: Jan Simon

Hello Jan,

I'm not sure if I interpret the TestXSum correctly, but many methods ran under 2010A 64-bit Matlab seems to get worse accuracy than 2009B 32-bit Matlab (see below). Any idea why?

------------------------------------------------------------------------
32-bit 2009B, MSVC 2008 SP1

  RANDN: Absolute results, sum estimated by Knuth2, average over 20 runs:
  Smaller results are better!
  0 must be replied for Knuth2, but even Knuth should be exact.
  X = RANDN(1, 1E4):
    SUM : 2.0996538E-013
    SUM(SORT): 1.1599255E-011
    Double : 0
    Long : 0
    Kahan : 2.3092639E-015
    Knuth : 0
    Knuth2 : 0
  X = RANDN(1, 1E5):
    SUM : 2.5210056E-012
    SUM(SORT): 4.2349626E-010
    Double : 0
    Long : 0
    Kahan : 1.2478907E-014
    Knuth : 0
    Knuth2 : 0
  X = RANDN(1, 1E6):
    SUM : 1.551328E-011
    SUM(SORT): 6.7532937E-009
    Double : 1.0658141E-015
    Long : 1.0658141E-015
    Kahan : 1.3500312E-014
    Knuth : 0
    Knuth2 : 0

------------------------------------------------------------------------
64-bit 2010A, MSVC 2008 SP1
  RANDN: Absolute results, sum estimated by Knuth2, average over 20 runs:
  Smaller results are better!
  0 must be replied for Knuth2, but even Knuth should be exact.
  X = RANDN(1, 1E4):
    SUM : 2.0996538E-013
    SUM(SORT): 1.1599255E-011
    Double : 2.0996538E-013
    Long : 2.0996538E-013
    Kahan : 2.3092639E-015
    Knuth : 0
    Knuth2 : 0
  X = RANDN(1, 1E5):
    SUM : 2.5210056E-012
    SUM(SORT): 4.2349626E-010
    Double : 3.2762681E-012
    Long : 3.2762681E-012
    Kahan : 1.2478907E-014
    Knuth : 0
    Knuth2 : 0
  X = RANDN(1, 1E6):
    SUM : 1.551328E-011
    SUM(SORT): 6.7532937E-009
    Double : 2.3623414E-011
    Long : 2.3623414E-011
    Kahan : 1.3500312E-014
    Knuth : 0
    Knuth2 : 0

11 Jan 2010 Sparse sub access This package allows to retrieve and assign values of sparse matrix in one shot. Author: Bruno Luong

Thanks for the tip James.

Comments and Ratings on Bruno's Files View all
Updated File Comment by Comments Rating
09 Mar 2010 ISMEMBERF Floating-point ISMEMBER (i.e., with round-off tolerance) Author: Bruno Luong Komarov, Oleg

Well, I suggest at this point to document this behaviour and to add in the see also line the HISTC.

Something like:
A(i) is member of the set S if the following condition is verified at least once:
k - tol <= A(i) < k + tol for k = S(1)...S(K)
 
Best

09 Mar 2010 ISMEMBERF Floating-point ISMEMBER (i.e., with round-off tolerance) Author: Bruno Luong Luong, Bruno

Hi Oleg,

This behavior is known (but not documented) due to the use of HISTC as you have correctly pointed out. User should never rely on the threshold tolerance in order to discriminate floats through exact comparison. Please enlarge the tolerance or add point to set member to work around.

Bruno

08 Mar 2010 ISMEMBERF Floating-point ISMEMBER (i.e., with round-off tolerance) Author: Bruno Luong Komarov, Oleg

Dear Bruno,
I want to bring this case to your attention:

tf = ismemberf(2.8, 2.9, 'tol',.1) --> 1
tf = ismemberf(3, 2.9, 'tol',.1) --> 0

It's following histc behaviour on line 287 (lowB <= x < uppB), is this meant?

Regards
Oleg

04 Mar 2010 Sparse sub access This package allows to retrieve and assign values of sparse matrix in one shot. Author: Bruno Luong Luong, Bruno

Hello H,

I can't really help with memory problem. The suggestion I can give is to try on your side to increase the free largest memory block from other places. Thanks for the kind words.

Bruno

03 Mar 2010 Sparse sub access This package allows to retrieve and assign values of sparse matrix in one shot. Author: Bruno Luong H

This seems to have one problem though:

Before I used A(:,indexes)=0, it just took a lot of time.

No I tried

[I J]=find(A);
idxofzero = ismember(J,indexes);
A=setsparse(A,I(idxofzero),J(idxofzero),0);

And I get "out of memory error". I tried it several times with both methods and got the same result. Am I missing something here?

My sparse matrix is about 55,000 x 55,000 and it has 4,060,200 nnz elements. The indexes hold about 1/100 of the columns.

Top Tags Applied by Bruno
array, eval, hist, histc, histogram
Files Tagged by Bruno View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
02 Feb 2010 Consecutive vector spliter Partition an input vector into smaller series of subvectors of consecutive elements Author: Bruno Luong split vectors, array, cell 52 3
  • 5.0
5.0 | 3 ratings
10 Jan 2010 Sparse sub access This package allows to retrieve and assign values of sparse matrix in one shot. Author: Bruno Luong large size, matrix, spfun, sparse, sub indexing, update 53 10
  • 5.0
5.0 | 4 ratings
10 Jan 2010 Min/Max selection Search for k smallest or largest elements in the array Author: Bruno Luong max, min, quicksort, kthvalue, selection, partial sort 62 4
  • 5.0
5.0 | 3 ratings
14 Dec 2009 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 61 0
  • 4.0
4.0 | 1 rating
01 Dec 2009 Min/Max filter Multidimensional non-linear min/max filtering Author: Bruno Luong dilatation, running min, running max, erosion, pattern recognition, filtering 94 0
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com