NAClab -- Numerical Algebraic Computing Toolbox for Matlab

Project leaders:   Tien-Yien Li  and  Zhonggang Zeng

A robust software package for accurate numerical solution of algebraic problems assuming the data are perturbed, along with programming tools for further research and development.

[Download] [Table of Contents] [Key features] Copyright © 2012 by Zhonggang Zeng.  All rights reserved.  Updated on September 5, 2012

NAClab a joint research project in development by Tien-Yien Li at Michigan State University and Zhonggang Zeng at Northeastern Illinois University. supported by National Science Foundation under grants DMS-1115587,  DMS-0715127 and DMS-0412003. It is an expansion from its predecessor Apalab (and its Maple counterpart is  ApaTools).  Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author and do not necessarily reflect the views of the National Science Foundation.  Disclaimer:   NAClab is an on-going research project, not yet a finished product.  Bugs, errors and shortcomings certainly exist.  The author is not responsible for any damage  or loss from using this software. Users should verify their results through other means.

Contact via email:  zzeng at  neiu dot edu   (Zhonggang Zeng)
                             li at math dot msu dot edu  (Tien-Yien Li)

Co-laborators and contributors:  Liping Chen, Tianran Chen, Wenrui Hao, Tsung-Lin Lee, Wenyuan Wu, Andrew Sommese

Publication on Apalab:   ApaTools:  A software toolbox for approximate polynomial algebraZhonggang Zeng,  in Software for Algebraic Geometry,  IMA Volume 148, M.S. Stillman et al. eds.,  Springer,  pp149-167,  2008

New!!! Solving polynomial systems using homotopy method based on HOM4PS

Polynomials systems can be solved  for numerical solutions in a straightforward and intuitive setting.  For example: To solve the following polynomial system with 20 zeros

        -x^5+y^5-3*y-1 = 5*y^4-3 = -20*x+y-z = 0
simply call "psolve":
>> P = {'-x^5+y^5-3*y-1','5*y^4-3','-20*x+y-z'};  % define the polynomial system

>> [Solutions, variables] = psolve(P)             % call the polynomial system solver

   Solutions =

     Column 1

     0.778497746685646 + 0.893453081179308i
    -0.000000000000000 + 0.880111736793394i
   -15.569954933712914 -16.988949886792764i

     ... ...

     Column 20

     0.778497746685646 - 0.893453081179308i
     0.000000000000000 - 0.880111736793393i
   -15.569954933712925 +16.988949886792767i

   variables =

    'x'    'y'    'z'

New!!! Direct polynomial manipulation:  

(Symbolic Math Toolbox is not needed, except for multiplicity computation of nonlinear systems other than polynomials)
Polynomials can now be entered and shown as character strings, such as  
   >> f = '3*x^2 - (2-5i)*x^3*y^4 - 1e-3*z^5-6.8'
   >> g = '-2*y^3 - 5*x^2*z + 8.2'

Using polynomials strings as input, users can now perform common polynomial operations  such as addition, multiplication, power, evaluation, differentiation, factorization, extracting coefficients, finding greatest common divison (GCD), by calling NAClab functions, such as
   >> p = PolynomialPlus('2*x^5-3*y','4+x*y')     % add any number of polynomials
   >> q = PolynomialTimes(f,g,h)  % multiply any number of polynomials
   >> v = PolynomialEvaluate(f,{'x','z'},[3,4]) % evaluate f(x,y,z) for x=3, z=4
and a lot more.  For example, to compute a greatest common divisor:

   >> f = '10 - 5*x^2*y + 6*x*y^2 - 3*x^3*y^3';
   >> g = '30 + 10*y + 18*x*y^2 + 6*x*y^3'
   >> u = PolynomialGCD(f,g)
   u =
   33.5410196624968 + 20.1246117974981*x*y^2

significant Key features:

The functions for
are major development in both algorithm design and software implementations. For instance, the univariate factorization is based on an award winning paper on accurate computation of multiple roots

Table of contents

List of functions:

     Functions are in three categories:  Queck-access functions,  Programming tools for polynomial compuations,  and  Matrix compuation tools

Quick-access polynomial functions:

Functions in this category accept input polynomials as character strings, such as
   >> f = '3*x^2 - (2-5i)*x^3*y^4 - 1e-3*z^5-6.8'
   >> g = '-2*y^3 - 5*x^2*z + 8.2'

A list of quick access functions are as follows.  Use, say >> help GetVariables, to access documentations.  Many functions have shortened aliases. For example, pvar is an alias for GetVariables.  

Programming tools for polynomial computations:

Functions in this category are designed for experts for developing algorithms and implementations for numerical polynomial algebra. These functions requires polynomials represented as either a coefficient matrix or a coefficient vector.  

A univariate polynomial is represented by its coefficient vector.  For example,  f(x) = x3 + 2x2 + 3x + 4  is represented as
               >> f  =  [1, 2, 3, 4]   % or  its transpose

An  m-multivariate polynomial  of  n  terms is represented by a coefficient matrix  of size  (m+1) by  n  according to the following rules:
     1.  Every column of  F  represents one term (monomial)
     2.  F(i,j)    for i<m+1   is the exponent of the i-th variable on j-th term
     3.  F(m+1,j)  is the coefficient of the j-th term
For example, let    p(x, y, z)  =  8.5  +  (3-2i)x3 y  +  5 x2 z5   -  2 y3   + 6 y3 z2  .   Users can transform its string representation to coefficient matrix representation by calling the quick access function PolynString2CoefMat :  
   >> f = '8.5 + (3-2i)*x^3*y + 5*x^2*z^5 - 2*y^3 + 6*y^3*z^2';
   >> F = PolynString2CoefMat(f,{'x','y','z'})
   F =

        0     3.0000                     0          0     2.0000         
        0     1.0000                3.0000     3.0000          0         
        0          0                     0     2.0000     5.0000         
   8.5000     3.0000 - 2.0000i     -2.0000     6.0000     5.0000     

The following are a list of expert functions

Matrix computation functions

Modules with brief explanations and examples