Rank: 53 based on 2447 downloads (last 30 days) and 21 files submitted
photo

James Tursa

E-mail
Lat/Long
47.68167, -122.2075

Personal Profile:

Interested in external applications, mex & engine applications with Fortran, C, C++, etc.

Professional Interests:

 

Watch this Author's files

 

Files Posted by James View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
11 Nov 2009 Screenshot mpower2 - A faster matrix power function. mpower2 evaluates matrix to an integer power faster than the MATLAB built-in function mpower. Author: James Tursa matrix, power, mpower 51 2
11 Nov 2009 Screenshot polyvalm2 - A faster matrix polynomial evaluator polyvalm2 evaluates a polynomial with a matrix argument faster than the MATLAB function polyvalm. Author: James Tursa matrix, polynomial, polyvalm, mpower 36 3
  • 5.0
5.0 | 1 rating
23 Oct 2009 Screenshot num2vpi - Converts input exactly into vpi Converts double inputs larger than 2^53-1, or char inputs with exponents, exactly into vpi. Author: James Tursa vpi, precision, variable, integer 109 0
25 Sep 2009 Screenshot Fortran mex routine mxGetClassName A drop-in replacement for the TMW Fortran API function mxGetClassName routine that does not work. Author: James Tursa fortran, mxgetclassname, mex, class name 113 0
05 Aug 2009 Screenshot num2strexact (exact version of num2str) num2strexact does exact conversion of number to string based on IEEE floating point bit pattern Author: James Tursa num2strexact, str2num, sprintf, num2str, precision, printf 139 0
Comments and Ratings by James View all
Updated File Comments Rating
21 Nov 2009 IEEE 754r Half Precision floating point converter Converts MATLAB or C variables to/from IEEE 754r Half Precision floating point bit pattern. Author: James Tursa

Also this:

#include <stdint.h>

21 Nov 2009 IEEE 754r Half Precision floating point converter Converts MATLAB or C variables to/from IEEE 754r Half Precision floating point bit pattern. Author: James Tursa

I just got a report from a 64-bit linux user that the ieehalfprecision.c code did not work as posted, but he did get it to work by changing some types as follows:

#define INT16_TYPE int16_t
#define UINT16_TYPE uint16_t
#define INT32_TYPE int32_t
#define UINT32_TYPE uint32_t

I do not have a 64-bit system to test with, but I would assume this works as long as your compiler supports the int16_t etc types.

12 Nov 2009 mpower2 - A faster matrix power function. mpower2 evaluates matrix to an integer power faster than the MATLAB built-in function mpower. Author: James Tursa

Gianni: Raising to a power with matrix multiplies is not mathematically defined for non-square matrices. Hence mpower2 (and MATLAB's own mpower) do not support this operation. For vectors, an operation that *is* supported in MATLAB is the element-wise power using the .^ operator.

11 Nov 2009 polyvalm2 - A faster matrix polynomial evaluator polyvalm2 evaluates a polynomial with a matrix argument faster than the MATLAB function polyvalm. Author: James Tursa

Bruno: Done. Thanks for the suggestion. polyvalm2 now keeps all the intermediate calculations and the answer as sparse for sparse inputs.

01 Sep 2009 Sin Cos 01 Find the zero and one degree values. Author: M P

Wow, I think I am finally getting this stuff. I have to admit it took be awhile to get the meaning of your other posts, but this one for some reason just stood out. These lines from your description were the key:

POSitive half unity: 51
POSitive unity: 102

After that it was simply putting this together with both of these lines:

X = sin(360°)
180 = sin(360°)

to get that this was a POSitive Program Of Sines (POS), or POS POS! Yeah, I finally got it! So I think you should re-title this submission as:

POS POS: Sin Cos 01

Comments and Ratings on James' Files View all
Updated File Comment by Comments Rating
21 Nov 2009 IEEE 754r Half Precision floating point converter Converts MATLAB or C variables to/from IEEE 754r Half Precision floating point bit pattern. Author: James Tursa Tursa, James

Also this:

#include <stdint.h>

21 Nov 2009 IEEE 754r Half Precision floating point converter Converts MATLAB or C variables to/from IEEE 754r Half Precision floating point bit pattern. Author: James Tursa Tursa, James

I just got a report from a 64-bit linux user that the ieehalfprecision.c code did not work as posted, but he did get it to work by changing some types as follows:

#define INT16_TYPE int16_t
#define UINT16_TYPE uint16_t
#define INT32_TYPE int32_t
#define UINT32_TYPE uint32_t

I do not have a 64-bit system to test with, but I would assume this works as long as your compiler supports the int16_t etc types.

12 Nov 2009 mpower2 - A faster matrix power function. mpower2 evaluates matrix to an integer power faster than the MATLAB built-in function mpower. Author: James Tursa Tursa, James

Gianni: Raising to a power with matrix multiplies is not mathematically defined for non-square matrices. Hence mpower2 (and MATLAB's own mpower) do not support this operation. For vectors, an operation that *is* supported in MATLAB is the element-wise power using the .^ operator.

12 Nov 2009 mpower2 - A faster matrix power function. mpower2 evaluates matrix to an integer power faster than the MATLAB built-in function mpower. Author: James Tursa Schena, Gianni

super... but only with square matrices as far as I understant
can it work also with vectors ?
regards, gianni

12 Nov 2009 polyvalm2 - A faster matrix polynomial evaluator polyvalm2 evaluates a polynomial with a matrix argument faster than the MATLAB function polyvalm. Author: James Tursa Luong, Bruno

Neatly coded. How often do you see a Matlab stock matrix function get beaten in speed?

Top Tags Applied by James
external interface, mex, precision, fortran, bit
Files Tagged by James View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
11 Nov 2009 Screenshot mpower2 - A faster matrix power function. mpower2 evaluates matrix to an integer power faster than the MATLAB built-in function mpower. Author: James Tursa matrix, power, mpower 51 2
11 Nov 2009 Screenshot polyvalm2 - A faster matrix polynomial evaluator polyvalm2 evaluates a polynomial with a matrix argument faster than the MATLAB function polyvalm. Author: James Tursa matrix, polynomial, polyvalm, mpower 36 3
  • 5.0
5.0 | 1 rating
23 Oct 2009 Screenshot num2vpi - Converts input exactly into vpi Converts double inputs larger than 2^53-1, or char inputs with exponents, exactly into vpi. Author: James Tursa vpi, precision, variable, integer 109 0
25 Sep 2009 Screenshot Fortran mex routine mxGetClassName A drop-in replacement for the TMW Fortran API function mxGetClassName routine that does not work. Author: James Tursa fortran, mxgetclassname, mex, class name 113 0
05 Aug 2009 Screenshot num2strexact (exact version of num2str) num2strexact does exact conversion of number to string based on IEEE floating point bit pattern Author: James Tursa num2strexact, str2num, sprintf, num2str, precision, printf 139 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