|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.jmat.MatlabSyntax
Description : Enables an easy to use Matlab-like syntax for invokation of main features.
Copyright : GPL
| Field Summary | |
protected long |
t
|
| Constructor Summary | |
MatlabSyntax()
|
|
| Method Summary | |
static Matrix |
abs(Matrix A)
Element-by-element inverse |
static Matrix |
chol(Matrix A)
Cholesky Decomposition |
static double |
cond(Matrix A)
Matrix condition (2 norm) |
static Matrix |
corrcoef(Matrix A)
Generate a correlation matrix. |
static Matrix |
cos(Matrix A)
Element-by-element cosinus |
static Matrix |
cov(Matrix A)
Generate a covariance matrix. |
static double |
det(Matrix A)
Matrix determinant |
static Matrix |
diag(Matrix A)
Matrix diagonal extraction. |
static Matrix |
diag(Matrix A,
int num)
Matrix diagonal extraction. |
static void |
disp(Matrix A)
Print the Matrix in the Command Line. |
static void |
disp(java.lang.String text)
Print the Matrix in the Command Line. |
static Matrix |
divide(Matrix A,
double s)
Divide a matrix by a scalar, C = A/s |
static Matrix |
divide(Matrix A,
Matrix B)
Linear algebraic matrix division, A / B |
static Matrix |
ebeDivide(Matrix A,
Matrix B)
Element-by-element right division, C = A. |
static Matrix |
ebeTimes(Matrix A,
Matrix B)
Element-by-element multiplication, C = A. |
static Matrix |
eig_D(Matrix A)
Eigenvalue Decomposition |
static Matrix |
eig_V(Matrix A)
Eigenvalue Decomposition |
static Matrix |
exp(Matrix A)
Element-by-element exponential |
static RandomMatrix |
expRnd(double mu,
int m,
int n)
Construct an m-by-n matrix of random numbers from an exponantial random variable. |
static Matrix |
eye(int m,
int n)
Generate identity matrix |
static Matrix |
find(Matrix A,
java.lang.String test,
double e)
Find elements verifying a boolean test |
static double |
get(Matrix A,
int i,
int j)
Get a single element. |
static Matrix |
get(Matrix A,
int i0,
int i1,
int j0,
int j1)
Get a submatrix. |
static Matrix |
getColumn(Matrix A,
int c)
Copy an internal one-dimensional array from a column. |
static Matrix |
getRow(Matrix A,
int l)
Copy an internal one-dimensional array from a row. |
static Plot2DPanel |
hist(Matrix X,
int n)
Plot the Matrix in a JFrame |
static Plot2DPanel |
hist(java.lang.String title,
Matrix X,
int n)
Plot the Matrix in a JFrame |
static Matrix |
inc(int m,
int n)
Generate a matrix with a constant pitch beetwen each row |
static Matrix |
inc(int m,
int n,
double begin,
double pitch)
Generate a matrix with a constant pitch beetwen each row |
static Matrix |
inv(Matrix A)
Matrix inverse or pseudoinverse |
static Matrix |
load(java.lang.String fileName)
Load the Matrix from an ASCII file. |
static Matrix |
log(Matrix A)
Element-by-element neperian logarithm |
static Matrix |
lu_L(Matrix A)
LU Decomposition |
static Matrix |
lu_P(Matrix A)
LU Decomposition |
static Matrix |
lu_U(Matrix A)
LU Decomposition |
static Matrix |
matrix(double[][] B)
Construct a matrix from a 2D-array. |
static Matrix |
matrix(int m,
int n,
double s)
Construct an m-by-n constant matrix. |
static Matrix |
max(Matrix A)
Generate a row matrix, each column contents the maximum value of the columns. |
static Matrix |
mean(Matrix A)
Generate a row matrix, each column contents the mean value of the columns. |
static Matrix |
merge(Matrix A,
Matrix B,
int n)
Generate a matrix from other matrix. |
static Matrix |
min(Matrix A)
Generate a row matrix, each column contents the minimum value of the columns. |
static Matrix |
minus(Matrix A,
Matrix B)
C = A - B |
static double |
norm(Matrix A,
java.lang.String n)
Norm |
static RandomMatrix |
normRnd(double mu,
double sigma,
int m,
int n)
Construct an m-by-n matrix of random numbers from an normal random variable. |
static Matrix |
ones(int m,
int n)
Construct an m-by-n matrix of ones. |
static Plot2DPanel |
plot(Matrix X,
Matrix Y)
Plot the Matrix in a JFrame |
static Plot2DPanel |
plot(java.lang.String title,
Matrix X,
Matrix Y)
Plot the Matrix in a JFrame |
static Plot3DPanel |
plot3(Matrix X,
Matrix Y,
Matrix Z)
Plot the Matrix in a Window in a JFrame |
static Plot3DPanel |
plot3(java.lang.String title,
Matrix X,
Matrix Y,
Matrix Z)
Plot the Matrix in a Window in a JFrame |
static Matrix |
plus(Matrix A,
Matrix B)
C = A + B |
static Matrix |
power(Matrix A,
double p)
Element-by-element power |
static Matrix |
power(Matrix A,
Matrix B)
Element-by-element power |
static Matrix |
prod(Matrix A)
Generate a row matrix, each column contents the product value of the columns. |
static Matrix |
qr_Q(Matrix A)
QR Decomposition |
static Matrix |
qr_R(Matrix A)
QR Decomposition |
static Matrix |
rand(int m,
int n)
Generate matrix with random elements |
static int |
rank(Matrix A)
Matrix rank |
static Matrix |
reshape(Matrix A,
int m2,
int n2)
Matrix reshape by Row. |
static Matrix |
resize(Matrix A,
int m2,
int n2)
Matrix resize. |
static void |
save(java.lang.String fileName,
Matrix A)
Save the Matrix in an ASCII file. |
static void |
set(Matrix A,
int i,
int j,
double s)
Set a single element. |
static void |
set(Matrix A,
int i0,
int i1,
int j0,
int j1,
Matrix X)
Set a submatrix. |
static void |
setColumn(Matrix A,
int c,
Matrix B)
Set a column to an internal one-dimensional Column. |
static void |
setRow(Matrix A,
int l,
Matrix B)
Copy an internal one-dimensional array from a row. |
static Matrix |
sin(Matrix A)
Element-by-element sinus |
static int |
size(Matrix A,
int dim)
Get row dimension. |
static Matrix |
solve(Matrix A,
Matrix B)
Solve A*X = B |
static Matrix |
sort_I(Matrix A)
Generate a column-permuted matrix, rows are permuted in order to sort the column 'c' |
static Matrix |
sort_Y(Matrix A)
Generate a column-permuted matrix, rows are permuted in order to sort the column 'c' |
static Matrix |
sqrt(Matrix A)
Element-by-element inverse |
static Matrix |
sum(Matrix A)
Generate a row matrix, each column contents the sum value of the columns. |
static Matrix |
svd_S(Matrix A)
Singular Value Decomposition |
static Matrix |
svd_U(Matrix A)
Singular Value Decomposition |
static Matrix |
svd_V(Matrix A)
Singular Value Decomposition |
static Matrix |
t(Matrix A)
Matrix transpose. |
void |
tic()
reset the time counter |
static Matrix |
times(Matrix A,
double s)
Multiply a matrix by a scalar, C = s*A |
static Matrix |
times(Matrix A,
Matrix B)
Linear algebraic matrix multiplication, A * B |
double |
toc()
set the time counter |
static double |
trace(Matrix A)
Matrix trace. |
static RandomMatrix |
triangRnd(int m,
int n,
double min,
double mod,
double max)
Construct an m-by-n matrix of random numbers from an triangular random variable. |
static Matrix |
uminus(Matrix A)
Unary minus |
static RandomMatrix |
unifRnd(int m,
int n,
double min,
double max)
Construct an m-by-n matrix of random numbers from an uniform random variable. |
static Matrix |
var(Matrix A)
Generate a variance matrix. |
static Matrix |
zeros(int m,
int n)
Construct an m-by-n matrix of zeros. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected long t
| Constructor Detail |
public MatlabSyntax()
| Method Detail |
public static Matrix zeros(int m,
int n)
m - Number of rows.n - Number of colums.
public static Matrix ones(int m,
int n)
m - Number of rows.n - Number of colums.
public static Matrix matrix(int m,
int n,
double s)
m - Number of rows.n - Number of colums.s - Fill the matrix with this scalar value.
public static Matrix matrix(double[][] B)
B - Two-dimensional array of doubles.
java.lang.IllegalArgumentException - All rows must have the same length
public static RandomMatrix normRnd(double mu,
double sigma,
int m,
int n)
m - Number of rows.n - Number of columns.mu - Mean of the normal random variable.sigma - Variance of the normal random variable.
public static RandomMatrix expRnd(double mu,
int m,
int n)
m - Number of rows.n - Number of columns.mu - Parmaeter of the exponential random variable.
public static RandomMatrix unifRnd(int m,
int n,
double min,
double max)
m - Number of rows.n - Number of columns.min - Min of the uniform random variable.max - Max of the uniform random variable.
public static RandomMatrix triangRnd(int m,
int n,
double min,
double mod,
double max)
m - Number of rows.n - Number of columns.min - Min of the uniform random variable.mod - Mode of the uniform random variable.max - Max of the uniform random variable.
public static Matrix rand(int m,
int n)
m - Number of rows.n - Number of colums.
public static Matrix eye(int m,
int n)
m - Number of rows.n - Number of colums.
public static Matrix inc(int m,
int n,
double begin,
double pitch)
m - Number of rows.n - Number of colums.begin - begining value to increment.pitch - pitch to add.
public static Matrix inc(int m,
int n)
m - Number of rows.n - Number of colums.
public static Matrix merge(Matrix A,
Matrix B,
int n)
A - 1st Matrix to merge.B - 2nd Matrix to merge.n - dimension to merge.
public static double get(Matrix A,
int i,
int j)
A - Matrix.i - Row index.j - Column index.
java.lang.ArrayIndexOutOfBoundsException
public static Matrix get(Matrix A,
int i0,
int i1,
int j0,
int j1)
A - Matrix.i0 - Initial row indexi1 - Final row indexj0 - Initial column indexj1 - Final column index
public static Matrix getRow(Matrix A,
int l)
A - Matrix.l - Row index
public static Matrix getColumn(Matrix A,
int c)
A - Matrix.c - Column index
public static int size(Matrix A,
int dim)
A - Matrix.dim - Dimension to return (1 = number of rows, 2 = number of columns).
public static Matrix diag(Matrix A)
A - Matrix.
public static Matrix diag(Matrix A,
int num)
A - Matrix.num - diagonal number.
public static void set(Matrix A,
int i,
int j,
double s)
A - Matrix.i - Row index.j - Column index.s - A(i,j).
public static void set(Matrix A,
int i0,
int i1,
int j0,
int j1,
Matrix X)
A - Matrix.i0 - Initial row indexi1 - Final row indexj0 - Initial column indexj1 - Final column indexX - subMatrix to add
public static void setRow(Matrix A,
int l,
Matrix B)
A - Matrix.l - Row indexB - Row-matrix
public static void setColumn(Matrix A,
int c,
Matrix B)
A - Matrix.c - Column indexB - Column-matrix
public static Matrix resize(Matrix A,
int m2,
int n2)
A - Matrix.m2 - number of rowsn2 - number of columns
public static Matrix reshape(Matrix A,
int m2,
int n2)
A - Matrix.m2 - number of rowsn2 - number of columns
public static Matrix t(Matrix A)
A - Matrix.
public static double norm(Matrix A,
java.lang.String n)
A - Matrix.n - Norm indice.
public static double det(Matrix A)
A - Matrix.
public static int rank(Matrix A)
A - Matrix.
public static double cond(Matrix A)
A - Matrix.
public static double trace(Matrix A)
A - Matrix.
public static Matrix min(Matrix A)
A - Matrix.
public static Matrix max(Matrix A)
A - Matrix.
public static Matrix sum(Matrix A)
A - Matrix.
public static Matrix prod(Matrix A)
A - Matrix.
public static Matrix mean(Matrix A)
A - Matrix.
public static Matrix cov(Matrix A)
A - Matrix.
public static Matrix corrcoef(Matrix A)
A - Matrix.
public static Matrix var(Matrix A)
A - Matrix.
public static Matrix uminus(Matrix A)
A - Matrix.
public static Matrix plus(Matrix A,
Matrix B)
A - Matrix.B - another matrix
public static Matrix minus(Matrix A,
Matrix B)
A - Matrix.B - another matrix
public static Matrix times(Matrix A,
double s)
A - Matrix.s - scalar
public static Matrix times(Matrix A,
Matrix B)
A - Matrix.B - another matrix
public static Matrix divide(Matrix A,
double s)
A - Matrix.s - scalar
public static Matrix divide(Matrix A,
Matrix B)
A - Matrix.B - another matrix
public static Matrix solve(Matrix A,
Matrix B)
A - Matrix.B - right hand side
public static Matrix inv(Matrix A)
A - Matrix.
public static Matrix ebeTimes(Matrix A,
Matrix B)
A - Matrix.B - another matrix
public static Matrix ebeDivide(Matrix A,
Matrix B)
A - Matrix.B - another matrix
public static Matrix cos(Matrix A)
A - Matrix.
public static Matrix sin(Matrix A)
A - Matrix.
public static Matrix exp(Matrix A)
A - Matrix.
public static Matrix power(Matrix A,
double p)
A - Matrix.p - double
public static Matrix power(Matrix A,
Matrix B)
A - Matrix.B - another matrix
public static Matrix log(Matrix A)
A - Matrix.
public static Matrix sqrt(Matrix A)
A - Matrix.
public static Matrix abs(Matrix A)
A - Matrix.
public static Matrix lu_L(Matrix A)
A - Matrix.
public static Matrix lu_U(Matrix A)
A - Matrix.
public static Matrix lu_P(Matrix A)
A - Matrix.
public static Matrix qr_Q(Matrix A)
A - Matrix.
public static Matrix qr_R(Matrix A)
A - Matrix.
public static Matrix chol(Matrix A)
A - Matrix.
public static Matrix svd_S(Matrix A)
A - Matrix.
public static Matrix svd_U(Matrix A)
A - Matrix.
public static Matrix svd_V(Matrix A)
A - Matrix.
public static Matrix eig_V(Matrix A)
A - Matrix.
public static Matrix eig_D(Matrix A)
A - Matrix.
public static Matrix sort_I(Matrix A)
A - Matrix.
public static Matrix sort_Y(Matrix A)
A - Matrix.
public static Matrix find(Matrix A,
java.lang.String test,
double e)
A - Matrix.test - Test to apply: < > =...e - Element (value) to compare
public static void disp(Matrix A)
A - Matrix.public static void disp(java.lang.String text)
text - String.
public static void save(java.lang.String fileName,
Matrix A)
A - Matrix.fileName - filename to save in.public static Matrix load(java.lang.String fileName)
fileName - filename of the file to load.
public static Plot2DPanel hist(Matrix X,
int n)
X - Matrix.n - Number of slices.
public static Plot2DPanel hist(java.lang.String title,
Matrix X,
int n)
X - Matrix.n - Number of slices.title - Title of the JFrame.
public static Plot2DPanel plot(Matrix X,
Matrix Y)
X - Matrix.Y - Matrix.
public static Plot2DPanel plot(java.lang.String title,
Matrix X,
Matrix Y)
title - Title of the JFrame.X - Matrix.Y - Matrix.
public static Plot3DPanel plot3(Matrix X,
Matrix Y,
Matrix Z)
X - MatrixY - MatrixZ - Matrix
public static Plot3DPanel plot3(java.lang.String title,
Matrix X,
Matrix Y,
Matrix Z)
title - Title of the JFrame.X - MatrixY - MatrixZ - Matrix
public void tic()
public double toc()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||