next up previous contents
Next: Comparison of LAPACK and Up: Vectors and Matrices (2) Previous: Vectors and Matrices (2)

LAPACK

The application jasymca (not the applet or midlet) contain JLAPACK [9], the Java-port of the LAPACK [10]-routines with extended and better algorithms for matrix calculations. However, these are limited to matrices with real coefficients in floating point format. The LAPACK routines are accessed by the following functions:
svd(A)
Singular value decomposition of A (1 or 3 returnvalues).
>> A=[2 3 1; 4 4 5; 2 9 3];
>> svd(A)
ans = [ 12.263  3.697  0.9705 ]
qr(A)
QR-decomposition of A (2 returnvalues).
>> A=[2 3 1; 4 4 5; 2 9 3];
>> [q,r]=qr(A)
q = 
  -0.40825    -5.3149E-2  -0.91132    
  -0.8165     -0.4252     0.39057     
  -0.40825    0.90354     0.13019     
r = 
  -4.899   -8.165   -5.7155  
  0        6.2716   0.53149  
  0        0        1.4321
linsolve2( A, b)
Solves $A\cdot x=b$ (1 returnvalue). Example in chapter 2.13.1.
linlstsq(A, b)
Solves $A\cdot x=b$, overdetermined (1 return value). For an example see insert ``Comparison of LAPACK and Jasymca Routines''.
eigen(A)
Eigenvalues of A (1 returnvalue).
>> A=[2 3 1; 4 4 5; 2 9 3];
>> eigen(A)
ans = [ 11.531  1.062  -3.593 ]



Helmut Dersch
2009-03-15