Rank: 647 based on 167 downloads (last 30 days) and 4 files submitted
photo

Petter

E-mail

Personal Profile:

Professional Interests:
Image processing, computer vision

 

Watch this Author's files

 

Files Posted by Petter View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Oct 2009 Published M-Files INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter addition, arithmetic, bitshift, absolute value, subtraction, modulo 66 11
  • 5.0
5.0 | 2 ratings
09 Jul 2009 Jacobi and Legendre symbol JACOBI computes the Jacobi symbol (m/n), a generalization of the Legendre symbol. Author: Petter jacobi symbol, number theory 23 0
05 Jun 2009 Use C++ "new" and "delete" in MATLAB MEX files This code modífies "new" and "delete" to register all allocated memory with the memory manager. Author: Petter delete, memory, new, memory management, c 15 0
12 Feb 2009 Published M-Files 0-1 Knapsack Solves the 0-1 knapsack problem with positive integer weights. Author: Petter 01 knapsack, knapsack, dynamic programming 63 5
  • 5.0
5.0 | 3 ratings
Comments and Ratings by Petter View all
Updated File Comments Rating
25 Sep 2009 INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter

Never mind, I misunderstood what you meant. Implementing a crude A*B is very easy, so I might do that.

24 Sep 2009 INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter

Array multiplication .* is already implemented.

18 Sep 2009 MatlabBGL MatlabBGL provides robust and efficient graph algorithms for Matlab using native data structures. Author: David Gleich

This is an exellent package!

18 Sep 2009 INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter

John, the reason the * operator is included at all is because it is desirable to support operations like
a = int64(2);
b = int64( [1 2; 3 4] );
c = a * b

That is the reason * was included. The next update will issue an error if both a and b are matrices. Thank you for your suggestions.

14 Sep 2009 fig2texPS - Export Matlab Figure to LaTeX Conversion of a Matlab figure to a LaTeX file with PSTricks compatible macros Author: Peter Scholz

Couldn't you create a standalone .tex file (with paper sizes etc.)which could be compiled using latex/ps2pdf into a separate pdf file containg the figure.

Then we pdfLatex users could include this file into our documents.

Comments and Ratings on Petter's Files View all
Updated File Comment by Comments Rating
25 Sep 2009 INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter Petter

Never mind, I misunderstood what you meant. Implementing a crude A*B is very easy, so I might do that.

24 Sep 2009 INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter Petter

Array multiplication .* is already implemented.

23 Sep 2009 INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter D'Errico, John

I can't test this myself, so I cannot rate it. But if it now prevents A*B when A and B are both matrices, neither of which is a scalar, then this is good if it would otherwise have done the wrong thing. Better of course is to implement array multiplication too (perhaps in a future version.) Regardless, there have been a few times recently when I wanted to have int64 operations defined, so this is a good addition to MATLAB.

18 Sep 2009 INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter Petter

John, the reason the * operator is included at all is because it is desirable to support operations like
a = int64(2);
b = int64( [1 2; 3 4] );
c = a * b

That is the reason * was included. The next update will issue an error if both a and b are matrices. Thank you for your suggestions.

15 Sep 2009 INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter O'Connor, Derek

John -- Thanks for pointing out that Int64 matrix multiplication is element-wise. I should have been more careful, given that the description clearly states that "multiplication and division are element-wise only". This of course explains the O(n^2) behavior.

On a more general point, I wish there was a consistent standard for matrix multiplicaton. For example, in O-Matrix, C= A*B is the same as Matlab, but C=A^2 gives cij = (aij)^2. This is really confusing. In Fortran 90, C=A*B gives cij = aij*bij.

Top Tags Applied by Petter
01 knapsack, absolute value, addition, arithmetic, bitshift
Files Tagged by Petter View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
24 Oct 2009 Published M-Files INT64 arithmetic in MATLAB Enables int64 Addition, subtraction, multiplication, division and modulus. Author: Petter addition, arithmetic, bitshift, absolute value, subtraction, modulo 66 11
  • 5.0
5.0 | 2 ratings
09 Jul 2009 Jacobi and Legendre symbol JACOBI computes the Jacobi symbol (m/n), a generalization of the Legendre symbol. Author: Petter jacobi symbol, number theory 23 0
05 Jun 2009 Use C++ "new" and "delete" in MATLAB MEX files This code modífies "new" and "delete" to register all allocated memory with the memory manager. Author: Petter delete, memory, new, memory management, c 15 0
12 Feb 2009 Published M-Files 0-1 Knapsack Solves the 0-1 knapsack problem with positive integer weights. Author: Petter 01 knapsack, knapsack, dynamic programming 63 5
  • 5.0
5.0 | 3 ratings
 

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