Matrix Functions, Null Space, and Hessenberg Matrices

by Pavel Holoborodko on April 4, 2012

The recently released Multiprecision Computing Toolbox version 3.3.2 introduces multiple new routines and features for advanced numerical computing in arbitrary precision.

  • Matrix functions, including logarithm, square root, exponential, trigonometric, and a general matrix function
    funm	% Evaluate general matrix function	
    expm	% Matrix exponential					
    sqrtm	% Matrix square root					
    logm	% Matrix logarithm					
    sinm	% Matrix sine							
    cosm	% Matrix cosine						
    sinhm	% Matrix hyperbolic sine				
    coshm	% Matrix hyperbolic cosine
  • Special cases of an “economy sized” SVD decomposition
    [U,S,V] = svd(X,0)
    [U,S,V] = svd(X,'econ')
  • Kernel(null space) matrices, and matrices in Hessenberg form
    null	% Null space
    hess	% Hessenberg form of matrix
  • The formatted conversion of multiprecision entities into a string, and to standard data types
    num2str	% Convert number to string
    cast	% Cast variable to different data type
    double	% Convert to double precision
    int16	% Convert to 16-bit signed integer
    int32	% Convert to 32-bit signed integer
    int64	% Convert to 64-bit signed integer
    int8	% Convert to 8-bit signed integer
    single	% Convert to single precision
    uint16	% Convert to 16-bit unsigned integer
    uint32	% Convert to 32-bit unsigned integer
    uint64	% Convert to 64-bit unsigned integer
    uint8	% Convert to 8-bit unsigned integer
  • Logical Operations
    all	% Determine whether all array elements are nonzero or true
    any	% Determine whether any array elements are nonzero
    not	% Find logical NOT of array or scalar input
    xor	% Logical exclusive-OR


>> mp.Digits(50);
% Matrix Logarithm
>> X = mp.rand(5);
>> norm(X - expm(logm(X)),1)
% Null Space of Matrix
>> X = mp.rand(3,5);
>> norm(X*null(X),1)
% Hessenberg Form of Matrix
>> X = mp.rand(10);
>> [P,H] = hess(X);
>> norm(X - P*H*P',1)

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: