Jump to content

Julia for MATLAB Users/Core Language/Mathematics

From Wikibooks, open books for an open world

Mathematics

[edit | edit source]

Most of the below functionality described in the core MATLAB Mathematics documentation has equivalent, often identical, functionality (more often that not with the same syntax) described in the Base.Mathematics section of the Julia manual. Specific equivalents are identified below; often these have the same names as in Matlab, otherwise the Julia equivalent name is noted.

Elementary Math

[edit | edit source]

Arithmetic

[edit | edit source]

See Arithmetic Operators in the Julia manual. Note that in Julia the operators are themselves methods and can be used anywhere a method can. See e.g. the example in the documentation for Base.map.

plus Addition

[edit | edit source]

uplus Unary plus

[edit | edit source]

minus Subtraction

[edit | edit source]

uminus Unary minus

[edit | edit source]

times Element-wise multiplication

[edit | edit source]

rdivide Right array division

[edit | edit source]

ldivide Left array division

[edit | edit source]

power Element-wise power

[edit | edit source]

mtimes Matrix Multiplication

[edit | edit source]

mrdivide Solve systems of linear equations for

[edit | edit source]

mldivide Solve systems of linear equations for

[edit | edit source]

mpower Matrix power

[edit | edit source]

cumprod Cumulative product

[edit | edit source]

cumsum Cumulative sum

[edit | edit source]

diff Differences and Approximate Derivatives

[edit | edit source]

movsum Moving sum

[edit | edit source]

prod Product of array elements

[edit | edit source]

sum Sum of array elements

[edit | edit source]

ceil Round toward positive infinity

[edit | edit source]

fix Round toward zero

[edit | edit source]

floor Round toward negative infinity

[edit | edit source]

idivide Integer division with rounding option

[edit | edit source]

mod Remainder after division (modulo operation)

[edit | edit source]

rem Remainder after division

[edit | edit source]

round Round to nearest decimal or integer

[edit | edit source]

bsxfun Apply element-wise operation to two arrays with implicit expansion enabled

[edit | edit source]

Trigonometry

[edit | edit source]

See Trigonometric and Hyperbolic functions in the Julia manual.

sin Sine of argument in radians

[edit | edit source]

sind Sine of argument in degrees

[edit | edit source]

asin Inverse sine in radians

[edit | edit source]

asind Inverse sine in degrees

[edit | edit source]

sinh Hyperbolic sine of argument in radians

[edit | edit source]

asinh Inverse hyperbolic sine

[edit | edit source]

cos Cosine of argument in radians

[edit | edit source]

cosd Cosine of argument in degrees

[edit | edit source]

acos Inverse cosine in radians

[edit | edit source]

acosd Inverse cosine in degrees

[edit | edit source]

cosh Hyperbolic cosine

[edit | edit source]

acosh Inverse hyperbolic cosine

[edit | edit source]

tan Tangent of argument in radians

[edit | edit source]

tand Tangent of argument in degrees

[edit | edit source]

atan Inverse tangent in radians

[edit | edit source]

atand Inverse tangent in degrees

[edit | edit source]

atan2 Four-quadrant inverse tangent

[edit | edit source]

atan2d Four-quadrant inverse tangent in degrees

[edit | edit source]

tanh Hyperbolic tangent

[edit | edit source]

atanh Inverse hyperbolic tangent

[edit | edit source]

csc Cosecant of input angle in radians

[edit | edit source]

cscd Cosecant of argument in degrees

[edit | edit source]

acsc Inverse cosecant in radians

[edit | edit source]

acscd Inverse cosecant in degrees

[edit | edit source]

csch Hyperbolic cosecant

[edit | edit source]

acsch Inverse hyperbolic cosecant

[edit | edit source]

sec Secant of angle in radians

[edit | edit source]

secd Secant of argument in degrees

[edit | edit source]

asec Inverse secant in radians

[edit | edit source]

asecd Inverse secant in degrees

[edit | edit source]

sech Hyperbolic secant

[edit | edit source]

asech Inverse hyperbolic secant

[edit | edit source]

cot Cotangent of angle in radians

[edit | edit source]

cotd Cotangent of argument in degrees

[edit | edit source]

acot Inverse cotangent in radians

[edit | edit source]

acotd Inverse cotangent in degrees

[edit | edit source]

coth Hyperbolic cotangent

[edit | edit source]

acoth Inverse hyperbolic cotangent

[edit | edit source]

hypot Square root of sum of squares (hypotenuse)

[edit | edit source]

deg2rad Convert angle from degrees to radians

[edit | edit source]

rad2deg Convert angle from radians to degrees

[edit | edit source]

Exponents and Logarithms

[edit | edit source]

See Powers, logs and roots in the Julia manual.

exp Exponential

[edit | edit source]

expm1 Compute accurately for small values of x

[edit | edit source]

log Natural logarithm

[edit | edit source]

log10 Common logarithm (base 10)

[edit | edit source]

log1p Compute log(1+x) accurately for small values of x

[edit | edit source]

log2 Base 2 logarithm and floating-point number dissection

[edit | edit source]

nextpow2 Exponent of next higher power of 2

[edit | edit source]

nthroot Real nth root of real numbers

[edit | edit source]

pow2 Base 2 power and scale floating-point numbers

[edit | edit source]

reallog Natural logarithm for nonnegative real arrays

[edit | edit source]

realpow Array power for real-only output

[edit | edit source]

realsqrt Square root for nonnegative real arrays

[edit | edit source]

sqrt Square root

[edit | edit source]

Complex Numbers

[edit | edit source]

See Complex Numbers in the Julia manual.

abs Absolute value and complex magnitude

[edit | edit source]

angle Phase angle

[edit | edit source]

complex Create complex array

[edit | edit source]

conj Complex conjugate

[edit | edit source]

cplxpair Sort complex numbers into complex conjugate pairs

[edit | edit source]

i Imaginary unit

[edit | edit source]

imag Imaginary part of complex number

[edit | edit source]

isreal Determine whether array is real

[edit | edit source]

j Imaginary unit

[edit | edit source]

real Real part of complex number

[edit | edit source]

sign Sign function (signum function)

[edit | edit source]

unwrap Correct phase angles to produce smoother phase plots

[edit | edit source]

Discrete Math

[edit | edit source]

Equivalents available in Julia Base

[edit | edit source]
factorial Factorial of input
[edit | edit source]
gcd Greatest common divisor
[edit | edit source]
lcm Least common multiple
[edit | edit source]

Equivalents available in JuliaMath/Primes.jl

[edit | edit source]
factor Prime factors
[edit | edit source]
primes Prime numbers less than or equal to input value
[edit | edit source]
isprime Determine which array elements are prime
[edit | edit source]
nchoosek Binomial coefficient or all combinations (Julia: binomial)
[edit | edit source]

Others

[edit | edit source]
perms All possible permutations
[edit | edit source]

The Julia Permutations.permutations(a) function ( Permutations.jl package) returns an iterator object (because the number of permutations can be very large), and in lexicographic order rather than reverse lexicographic. Therefore a drop-in equivalent could be constructed as follows:

julia> perms(a) = reverse(collect(permutations(a)))
perms (generic function with 1 method)

julia> perms([2,4,6])
6-element Array{Array{Int64,1},1}:
 [6, 4, 2]
 [6, 2, 4]
 [4, 6, 2]
 [4, 2, 6]
 [2, 6, 4]
 [2, 4, 6]

rat Rational fraction approximation, rats Rational output
[edit | edit source]

There doesn't appear to be a direct Julia equivalent of these, but note that unlike Matlab, Julia has a native Rational Number type .

Polynomials

[edit | edit source]

See the Polynomials.jl package. Note that this package provides a proper type for polynomials, Polynomials.Poly, while in Matlab a polynomial of degree is represented by a vector of length whose elements are the coefficients in descending powers of the polynomial.

poly Polynomial with specified roots or characteristic polynomial

[edit | edit source]

polyeig Polynomial eigenvalue problem

[edit | edit source]

polyfit Polynomial curve fitting

[edit | edit source]

Polynomials.polyfit provides comparable basic functionality--the single output argument form of the Matlab function--although it lacks the additional error estimate and centering/scaling features.

residue Partial fraction expansion (partial fraction decomposition)

[edit | edit source]

roots Polynomial roots

[edit | edit source]

Polynomials.roots provides roots with multiplicity.

polyval Polynomial evaluation

[edit | edit source]

See Base.Math.@evalpoly in the Julia Manual.

polyvalm Matrix polynomial evaluation

[edit | edit source]

conv Convolution and polynomial multiplication

[edit | edit source]

deconv Deconvolution and polynomial division

[edit | edit source]

polyint Polynomial integration

[edit | edit source]

polyder Polynomial differentiation

[edit | edit source]

Special Functions

[edit | edit source]

airy Airy Functions

[edit | edit source]

besselh Bessel function of third kind (Hankel function)

[edit | edit source]

besseli Modified Bessel function of first kind

[edit | edit source]

besselj Bessel function of first kind

[edit | edit source]

besselk Modified Bessel function of second kind

[edit | edit source]

bessely Bessel function of second kind

[edit | edit source]

beta Beta function

[edit | edit source]

betainc Incomplete beta function

[edit | edit source]

betaincinv Beta inverse cumulative distribution function

[edit | edit source]

betaln Logarithm of beta function

[edit | edit source]

ellipj Jacobi elliptic functions

[edit | edit source]

ellipke Complete elliptic integrals of first and second kind

[edit | edit source]

erf Error function

[edit | edit source]

erfc Complementary error function

[edit | edit source]

erfcinv Inverse complementary error function

[edit | edit source]

erfcx Scaled complementary error function

[edit | edit source]

erfinv Inverse error function

[edit | edit source]

expint Exponential integral

[edit | edit source]

gamma Gamma function

[edit | edit source]

gammainc Incomplete gamma function

[edit | edit source]

gammaincinv Inverse incomplete gamma function

[edit | edit source]

gammaln Logarithm of gamma function

[edit | edit source]

legendre Associated Legendre functions

[edit | edit source]

psi Psi (polygamma) function

[edit | edit source]

Cartesian Coordinate System Conversion

[edit | edit source]

cart2pol Transform Cartesian coordinates to polar or cylindrical

[edit | edit source]

cart2sph Transform Cartesian coordinates to spherical

[edit | edit source]

pol2cart Transform polar or cylindrical coordinates to Cartesian

[edit | edit source]

sph2cart Transform spherical coordinates to Cartesian

[edit | edit source]

Constants and Test Matrices

[edit | edit source]

Constants

[edit | edit source]

See General Number Functions and Constants in the Julia manual.

eps Floating-point relative accuracy

[edit | edit source]

flintmax Largest consecutive integer in floating-point format

[edit | edit source]

i, j Imaginary unit

[edit | edit source]

In Julia, im is equivalent; this allows i and j to be used as e.g. loop indices without conflict.

Inf Infinity

[edit | edit source]

pi Ratio of circle's circumference to its diameter

[edit | edit source]

Also available as pi in Julia as well as \piTab ↹ →

NaN Not-a-Number

[edit | edit source]

isfinite Array elements that are finite

[edit | edit source]

isinf Array elements that are infinite

[edit | edit source]

isnan Array elements that are NaN

[edit | edit source]

compan Companion matrix

[edit | edit source]

Test Matrices

[edit | edit source]

See the MatrixDepot.jl package; most of the matrices in gallery and all the rest below are available in that package, plus some additional ones.

[edit | edit source]

hadamard Hadamard matrix

[edit | edit source]

hankel Hankel matrix

[edit | edit source]

hilb Hilbert matrix

[edit | edit source]

invhilb Inverse of Hilbert matrix

[edit | edit source]

magic Magic square

[edit | edit source]

pascal Pascal matrix

[edit | edit source]

rosser Classic symmetric eigenvalue test problem

[edit | edit source]

toeplitz Toeplitz matrix

[edit | edit source]

vander Vandermonde matrix

[edit | edit source]

wilkinson Wilkinson's eigenvalue test matrix

[edit | edit source]

Linear Algebra

[edit | edit source]

See Linear Algebra in the Julia manual.

mldivide Solve systems of linear equations for

[edit | edit source]

mrdivide Solve systems of linear equations for

[edit | edit source]

decomposition Matrix decomposition for solving linear systems

[edit | edit source]

lsqminnorm Minimum norm least-squares solution to linear equation

[edit | edit source]

linsolve Solve linear system of equations

[edit | edit source]

inv Matrix inverse

[edit | edit source]

pinv Moore-Penrose pseudoinverse

[edit | edit source]

lscov Least-squares solution in presence of known covariance

[edit | edit source]

lsqnonneg Solve nonnegative linear least-squares problem

[edit | edit source]

sylvester Solve Sylvester equation for

[edit | edit source]

eig Eigenvalues and eigenvectors

[edit | edit source]

eigs Subset of eigenvalues and eigenvectors

[edit | edit source]

balance Diagonal scaling to improve eigenvalue accuracy

[edit | edit source]

svd Singular value decomposition

[edit | edit source]

svds Subset of singular values and vectors

[edit | edit source]

gsvd Generalized singular value decomposition

[edit | edit source]

ordeig Eigenvalues of quasitriangular matrices

[edit | edit source]

ordqz Reorder eigenvalues in QZ factorization

[edit | edit source]

ordschur Reorder eigenvalues in Schur factorization

[edit | edit source]

polyeig Polynomial eigenvalue problem

[edit | edit source]

qz QZ factorization for generalized eigenvalues

[edit | edit source]

hess Hessenberg form of matrix

[edit | edit source]

schur Schur decomposition

[edit | edit source]

rsf2csf Convert real Schur form to complex Schur form

[edit | edit source]

cdf2rdf Convert complex diagonal form to real block diagonal form

[edit | edit source]

lu LU matrix factorization

[edit | edit source]

ldl Block LDL' factorization for Hermitian indefinite matrices

[edit | edit source]

chol Cholesky factorization

[edit | edit source]

cholupdate Rank 1 update to Cholesky factorization

[edit | edit source]

qr Orthogonal-triangular decomposition

[edit | edit source]

qrdelete Remove column or row from QR factorization

[edit | edit source]

qrinsert Insert column or row into QR factorization

[edit | edit source]

qrupdate Rank 1 update to QR factorization

[edit | edit source]

planerot Givens plane rotation

[edit | edit source]

transpose Transpose vector or matrix

[edit | edit source]

ctranspose Complex conjugate transpose

[edit | edit source]

mtimes Matrix Multiplication

[edit | edit source]

mpower Matrix power

[edit | edit source]

sqrtm Matrix square root

[edit | edit source]

expm Matrix exponential

[edit | edit source]

logm Matrix logarithm

[edit | edit source]

funm Evaluate general matrix function

[edit | edit source]

kron Kronecker tensor product

[edit | edit source]

cross Cross product

[edit | edit source]

dot Dot product

[edit | edit source]

bandwidth Lower and upper matrix bandwidth

[edit | edit source]

tril Lower triangular part of matrix

[edit | edit source]

triu Upper triangular part of matrix

[edit | edit source]

isbanded Determine if matrix is within specific bandwidth

[edit | edit source]

isdiag Determine if matrix is diagonal

[edit | edit source]

ishermitian Determine if matrix is Hermitian or skew-Hermitian

[edit | edit source]

issymmetric Determine if matrix is symmetric or skew-symmetric

[edit | edit source]

istril Determine if matrix is lower triangular

[edit | edit source]

istriu Determine if matrix is upper triangular

[edit | edit source]

norm Vector and matrix norms

[edit | edit source]

normest 2-norm estimate

[edit | edit source]

vecnorm Vector-wise norm

[edit | edit source]

cond Condition number for inversion

[edit | edit source]

condest 1-norm condition number estimate

[edit | edit source]

rcond Reciprocal condition number

[edit | edit source]

condeig Condition number with respect to eigenvalues

[edit | edit source]

det Matrix determinant

[edit | edit source]

null Null space

[edit | edit source]

orth Orthonormal basis for range of matrix

[edit | edit source]

rank Rank of matrix

[edit | edit source]

rref Reduced row echelon form (Gauss-Jordan elimination)

[edit | edit source]

trace Sum of diagonal elements

[edit | edit source]

subspace Angle between two subspaces

[edit | edit source]

Random Number Generation

[edit | edit source]

rand Uniformly distributed random numbers

[edit | edit source]

randn Normally distributed random numbers

[edit | edit source]

randi Uniformly distributed pseudorandom integers

[edit | edit source]

randperm Random permutation

[edit | edit source]

rng Control random number generation

[edit | edit source]

randStream Random number stream

[edit | edit source]

Interpolation

[edit | edit source]

interp1 1-D data interpolation (table lookup)

[edit | edit source]

interp2 Interpolation for 2-D gridded data in meshgrid format

[edit | edit source]

interp3 Interpolation for 3-D gridded data in meshgrid format

[edit | edit source]

interpn Interpolation for 1-D, 2-D, 3-D, and N-D gridded data in ndgrid format

[edit | edit source]

gRiddedinterpolant Gridded data interpolation

[edit | edit source]

pchip Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)

[edit | edit source]

spline Cubic spline data interpolation

[edit | edit source]

ppval Evaluate piecewise polynomial

[edit | edit source]

mkpp Make piecewise polynomial

[edit | edit source]

unmkpp Extract piecewise polynomial details

[edit | edit source]

padecoef Padé approximation of time delays

[edit | edit source]

interpft 1-D interpolation (FFT method)

[edit | edit source]

ndgrid Rectangular grid in N-D space

[edit | edit source]

meshgrid 2-D and 3-D grids

[edit | edit source]

griddata Interpolate 2-D or 3-D scattered data

[edit | edit source]

griddatan Interpolate N-D scattered data

[edit | edit source]

scaTteredinterpolant Interpolate 2-D or 3-D scattered data

[edit | edit source]

Optimization

[edit | edit source]

fminbnd Find minimum of single-variable function on fixed interval

[edit | edit source]

fminsearch Find minimum of unconstrained multivariable function using derivative-free method

[edit | edit source]

lsqnonneg Solve nonnegative linear least-squares problem

[edit | edit source]

fzero Root of nonlinear function

[edit | edit source]

optimget Optimization options values

[edit | edit source]

optimset Create or edit optimization options structure

[edit | edit source]

Numerical Integration and Differential Equations

[edit | edit source]

See DifferentialEquations.jl. In particular see the section Translations from MATLAB/Python/R.

Ordinary Differential Equations

[edit | edit source]

ode45 Solve nonstiff differential equations — medium order method

[edit | edit source]

ode23 Solve nonstiff differential equations — low order method

[edit | edit source]

ode113 Solve nonstiff differential equations — variable order method

[edit | edit source]

ode15s Solve stiff differential equations and DAEs — variable order method

[edit | edit source]

ode23s Solve stiff differential equations — low order method

[edit | edit source]

ode23t Solve moderately stiff ODEs and DAEs — trapezoidal rule

[edit | edit source]

ode23tb Solve stiff differential equations — trapezoidal rule + backward differentiation formula

[edit | edit source]

ode15i Solve fully implicit differential equations — variable order method

[edit | edit source]

decic Compute consistent initial conditions for ode15i

[edit | edit source]

odeget Extract ODE option values

[edit | edit source]

odeset Create or modify options structure for ODE solvers

[edit | edit source]

deval Evaluate differential equation solution structure

[edit | edit source]

odextend Extend solution to ODE

[edit | edit source]

Boundary Value Problems

[edit | edit source]

bvp4c Solve boundary value problems for ordinary differential equations

[edit | edit source]

bvp5c Solve boundary value problems for ordinary differential equations

[edit | edit source]

bvpinit Form initial guess for BVP solvers

[edit | edit source]

bvpxtend Form guess structure for extending boundary value solutions

[edit | edit source]

bvpget Extract properties from options structure created with bvpset

[edit | edit source]

bvpset Create or alter options structure of boundary value problem

[edit | edit source]

deval Evaluate differential equation solution structure

[edit | edit source]

Delay Differential Equations

[edit | edit source]

dde23 Solve delay differential equations (DDEs) with constant delays

[edit | edit source]

ddesd Solve delay differential equations (DDEs) with general delays

[edit | edit source]

ddensd Solve delay differential equations (DDEs) of neutral type

[edit | edit source]

ddeget Extract properties from delay differential equations options structure

[edit | edit source]

ddeset Create or alter delay differential equations options structure

[edit | edit source]

deval Evaluate differential equation solution structure

[edit | edit source]

Partial Differential Equations

[edit | edit source]

pdepe Solve initial-boundary value problems for parabolic-elliptic PDEs in 1-D

[edit | edit source]

pdeval Evaluate numerical solution of PDE using output of pdepe

[edit | edit source]

Numerical Integration and Differentiation

[edit | edit source]

integral Numerical integration

[edit | edit source]

integral2 Numerically evaluate double integral

[edit | edit source]

integral3 Numerically evaluate triple integral

[edit | edit source]

quadgk Numerically evaluate integral, adaptive Gauss-Kronrod quadrature

[edit | edit source]

quad2d Numerically evaluate double integral, tiled method

[edit | edit source]

cumtrapz Cumulative trapezoidal numerical integration

[edit | edit source]

trapz Trapezoidal numerical integration

[edit | edit source]

polyint Polynomial integration

[edit | edit source]

del2 Discrete Laplacian

[edit | edit source]

diff Differences and Approximate Derivatives

[edit | edit source]

gradient Numerical gradient

[edit | edit source]

polyder Polynomial differentiation

[edit | edit source]

Fourier Analysis and Filtering

[edit | edit source]

fft Fast Fourier transform

[edit | edit source]

fft2 2-D fast Fourier transform

[edit | edit source]

fftn N-D fast Fourier transform

[edit | edit source]

fftshift Shift zero-frequency component to center of spectrum

[edit | edit source]

fftw Define method for determining FFT algorithm

[edit | edit source]

ifft Inverse fast Fourier transform

[edit | edit source]

ifft2 2-D inverse fast Fourier transform

[edit | edit source]

ifftn Multidimensional inverse fast Fourier transform

[edit | edit source]

ifftshift Inverse zero-frequency shift

[edit | edit source]

nextpow2 Exponent of next higher power of 2

[edit | edit source]

interpft 1-D interpolation (FFT method)

[edit | edit source]

conv Convolution and polynomial multiplication

[edit | edit source]

conv2 2-D convolution

[edit | edit source]

convn N-D convolution

[edit | edit source]

deconv Deconvolution and polynomial division

[edit | edit source]

filter 1-D digital filter

[edit | edit source]

filter2 2-D digital filter

[edit | edit source]

ss2tf Convert state-space representation to transfer function

[edit | edit source]

padecoef Padé approximation of time delays

[edit | edit source]

Sparse Matrices

[edit | edit source]

spalloc Allocate space for sparse matrix

[edit | edit source]

spdiags Extract and create sparse band and diagonal matrices

[edit | edit source]

speye Sparse identity matrix

[edit | edit source]

sprand Sparse uniformly distributed random matrix

[edit | edit source]

sprandn Sparse normally distributed random matrix

[edit | edit source]

sprandsym Sparse symmetric random matrix

[edit | edit source]

sparse Create sparse matrix

[edit | edit source]

spconvert Import from sparse matrix external format

[edit | edit source]

issparse Determine whether input is sparse

[edit | edit source]

nnz Number of nonzero matrix elements

[edit | edit source]

nonzeros Nonzero matrix elements

[edit | edit source]

nzmax Amount of storage allocated for nonzero matrix elements

[edit | edit source]

spfun Apply function to nonzero sparse matrix elements

[edit | edit source]

spones Replace nonzero sparse matrix elements with ones

[edit | edit source]

spparms Set parameters for sparse matrix routines

[edit | edit source]

spy Visualize sparsity pattern

[edit | edit source]

find Find indices and values of nonzero elements

[edit | edit source]

full Convert sparse matrix to full matrix

[edit | edit source]

dissect Nested dissection permutation

[edit | edit source]

amd Approximate minimum degree permutation

[edit | edit source]

colamd Column approximate minimum degree permutation

[edit | edit source]

colperm Sparse column permutation based on nonzero count

[edit | edit source]

dmperm Dulmage-Mendelsohn decomposition

[edit | edit source]

randperm Random permutation

[edit | edit source]

symamd Symmetric approximate minimum degree permutation

[edit | edit source]

symrcm Sparse reverse Cuthill-McKee ordering

[edit | edit source]

pcg Preconditioned conjugate gradients method

[edit | edit source]

minres Minimum residual method

[edit | edit source]

symmlq Symmetric LQ method

[edit | edit source]

gmres Generalized minimum residual method (with restarts)

[edit | edit source]

bicg Biconjugate gradients method

[edit | edit source]

bicgstab Biconjugate gradients stabilized method

[edit | edit source]

bicgstabl Biconjugate gradients stabilized (l) method

[edit | edit source]

cgs Conjugate gradients squared method

[edit | edit source]

qmr Quasi-minimal residual method

[edit | edit source]

tfqmr Transpose-free quasi-minimal residual method

[edit | edit source]

lsqr LSQR method

[edit | edit source]

ichol Incomplete Cholesky factorization

[edit | edit source]

ilu Incomplete LU factorization

[edit | edit source]

eigs Subset of eigenvalues and eigenvectors

[edit | edit source]

svds Subset of singular values and vectors

[edit | edit source]

normest 2-norm estimate

[edit | edit source]

condest 1-norm condition number estimate

[edit | edit source]

sprank Structural rank

[edit | edit source]

etree Elimination tree

[edit | edit source]

symbfact Symbolic factorization analysis

[edit | edit source]

spaugment Form least-squares augmented system

[edit | edit source]

dmperm Dulmage-Mendelsohn decomposition

[edit | edit source]

etreeplot Plot elimination tree

[edit | edit source]

treelayout Lay out tree or forest

[edit | edit source]

treeplot Plot picture of tree

[edit | edit source]
[edit | edit source]

unmesh Convert edge matrix to coordinate and Laplacian matrices

[edit | edit source]

Graph and Network Algorithms

[edit | edit source]

graph Graph with undirected edges

[edit | edit source]

digraph Graph with directed edges

[edit | edit source]

addnode Add new node to graph

[edit | edit source]

rmnode Remove node from graph

[edit | edit source]

addedge Add new edge to graph

[edit | edit source]

rmedge Remove edge from graph

[edit | edit source]

flipedge Reverse edge directions

[edit | edit source]

numnodes Number of nodes in graph

[edit | edit source]

numedges Number of edges in graph

[edit | edit source]

findnode Locate node in graph

[edit | edit source]

findedge Locate edge in graph

[edit | edit source]

edgecount Number of edges between two nodes

[edit | edit source]

reordernodes Reorder graph nodes

[edit | edit source]

subgraph Extract subgraph

[edit | edit source]
[edit | edit source]
[edit | edit source]

centrality Measure node importance

[edit | edit source]

maxflow Maximum flow in graph

[edit | edit source]

conncomp Connected graph components

[edit | edit source]

biconncomp Biconnected graph components

[edit | edit source]

condensation Graph condensation

[edit | edit source]

bctree Block-cut tree graph

[edit | edit source]

minspantree Minimum spanning tree of graph

[edit | edit source]

toposort Topological order of directed acyclic graph

[edit | edit source]

isdag Determine if graph is acyclic

[edit | edit source]

transclosure Transitive closure

[edit | edit source]

transreduction Transitive reduction

[edit | edit source]

isisomorphic Determine whether two graphs are isomorphic

[edit | edit source]

isomorphism Compute isomorphism between two graphs

[edit | edit source]

ismultigraph Determine whether graph has multiple edges

[edit | edit source]

simplify Reduce multigraph to simple graph

[edit | edit source]

shortestpath Shortest path between two single nodes

[edit | edit source]

shortestpathtree Shortest path tree from node

[edit | edit source]

distances Shortest path distances of all node pairs

[edit | edit source]

adjacency Graph adjacency matrix

[edit | edit source]

incidence Graph incidence matrix

[edit | edit source]

laplacian Graph Laplacian matrix

[edit | edit source]

degree Degree of graph nodes

[edit | edit source]

neighbors Neighbors of graph node

[edit | edit source]

nearest Nearest neighbors within radius

[edit | edit source]

indegree In-degree of nodes

[edit | edit source]

outdegree Out-degree of nodes

[edit | edit source]

predecessors Node predecessors

[edit | edit source]

successors Node successors

[edit | edit source]

inedges Incoming edges to node

[edit | edit source]

outedges Outgoing edges from node

[edit | edit source]

plot Plot graph nodes and edges

[edit | edit source]

labeledge Label graph edges

[edit | edit source]

labelnode Label graph nodes

[edit | edit source]

layout Change layout of graph plot

[edit | edit source]

highlight Highlight nodes and edges in plotted graph

[edit | edit source]

graphPlot Graph plot for directed and undirected graphs

[edit | edit source]

Computational Geometry

[edit | edit source]

See the JuliaGeometry GitHub organization.

Triangulation Representation

[edit | edit source]

triangulation Triangulation in 2-D or 3-D

[edit | edit source]

tetramesh Tetrahedron mesh plot

[edit | edit source]

trimesh Triangular mesh plot

[edit | edit source]

triplot 2-D triangular plot

[edit | edit source]

trisurf Triangular surface plot

[edit | edit source]

Delaunay Triangulation

[edit | edit source]

deLaunaytriangulation Delaunay triangulation in 2-D and 3-D

[edit | edit source]

delaunay Delaunay triangulation

[edit | edit source]

delaunayn N-D Delaunay triangulation

[edit | edit source]

tetramesh Tetrahedron mesh plot

[edit | edit source]

trimesh Triangular mesh plot

[edit | edit source]

triplot 2-D triangular plot

[edit | edit source]

trisurf Triangular surface plot

[edit | edit source]
[edit | edit source]

triangulation Triangulation in 2-D or 3-D

[edit | edit source]

deLaunaytriangulation Delaunay triangulation in 2-D and 3-D

[edit | edit source]
[edit | edit source]
[edit | edit source]

delaunay Delaunay triangulation

[edit | edit source]

delaunayn N-D Delaunay triangulation

[edit | edit source]

Bounding Regions

[edit | edit source]

boundary Boundary of a set of points in 2-D or 3-D

[edit | edit source]

alphaShape Polygons and polyhedra from points in 2-D and 3-D

[edit | edit source]

convhull Convex hull

[edit | edit source]

convhulln N-D convex hull

[edit | edit source]

Voronoi Diagram

[edit | edit source]

patch Create one or more filled polygons

[edit | edit source]

voronoi Voronoi diagram

[edit | edit source]

voronoin N-D Voronoi diagram

[edit | edit source]

Elementary Polygons

[edit | edit source]

The Julia package GeometricalPredicates.jl provides some similar functionality.

inpolygon Points located inside or on edge of polygonal region

[edit | edit source]

nsidedpoly Regular polygon

[edit | edit source]

polyarea Area of polygon

[edit | edit source]

polybuffer Create buffer around points or lines

[edit | edit source]

rectint Rectangle intersection area

[edit | edit source]

polyshape 2-D polygons

[edit | edit source]

addboundary Add polyshape boundary

[edit | edit source]

rmboundary Remove polyshape boundary

[edit | edit source]

rmholes Remove holes in polyshape

[edit | edit source]

rmslivers Remove polyshape boundary outliers

[edit | edit source]

simplify Simplify polyshape boundaries

[edit | edit source]

boundary Vertex coordinates of polyshape boundary

[edit | edit source]

isequal Determine if polyshape objects are equal

[edit | edit source]

ishole Determine if polyshape boundary is a hole

[edit | edit source]

isinterior Query points inside polyshape

[edit | edit source]

issimplified Determine if polyshape is well-defined

[edit | edit source]

nearestvertex Query nearest polyshape vertex

[edit | edit source]

numboundaries Number of polyshape boundaries

[edit | edit source]

numsides Number of polyshape sides

[edit | edit source]

overlaps Determine whether polyshape objects overlap

[edit | edit source]

area Area of polyshape

[edit | edit source]

boundingbox Bounding box of polyshape

[edit | edit source]

centroid Centroid of polyshape

[edit | edit source]

convhull Convex hull of polyshape

[edit | edit source]

perimeter Perimeter of polyshape

[edit | edit source]

triangulation Triangulate polyshape

[edit | edit source]

turningdist Compute turning distance between polyshape objects

[edit | edit source]

intersect Intersection of polyshape objects

[edit | edit source]

subtract Difference of two polyshape objects

[edit | edit source]

union Union of polyshape objects

[edit | edit source]

xor Exclusive OR of two polyshape objects

[edit | edit source]

polybuffer Buffer polyshape

[edit | edit source]

rotate Rotate polyshape

[edit | edit source]

scale Scale polyshape

[edit | edit source]

translate Translate polyshape

[edit | edit source]

holes Convert polyshape hole boundaries to array of polyshape objects

[edit | edit source]

plot Plot polyshape

[edit | edit source]

regions Access polyshape regions

[edit | edit source]

sortboundaries Sort polyshape boundaries

[edit | edit source]

sortregions Sort polyshape regions

[edit | edit source]