Learn R Programming

⚠️There's a newer version (1.9.9) of this package.Take me there.

pracma (version 1.5.5)

Practical Numerical Math Functions

Description

Functions from numerical analysis and linear algebra, numerical optimization, differential equations, plus some special functions. Uses Matlab function names where appropriate to simplify porting.

Copy Link

Version

Install

install.packages('pracma')

Monthly Downloads

108,124

Version

1.5.5

License

GPL (>= 3)

Maintainer

Last Published

September 15th, 2013

Functions in pracma (1.5.5)

clear, who(s), ver

Clear function (Matlab style)
clenshaw_curtis

Clenshaw-Curtis Quadrature Formula
eps

Floating Point Relative Accuracy
figure

Control Plot Devices (Matlab Style)
hampel

Hampel Filter
histss

Histogram Bin-width Optimization
interp2

Two-dimensional Data Interpolation
jacobian

Jacobian Matrix
laguerre

Laguerre's Method
lsqnonlin

Nonlinear Least-Squares Fitting
movavg

Moving Average Filters
newtonHorner

Newton's Root Finding Method for Polynomials.
polyApprox

Polynomial Approximation
Mode

Mode function (Matlab style)
quadgr

Gaussian Quadrature with Richardson Extrapolation
quadl

Adaptive Lobatto Quadrature
rmserr

Accuracy Measures
rkf54

Runge-Kutta-Fehlberg
rot90

Matrix Rotation
strcmp

String Comparison
strcat

String Concatenation
angle

Basic Complex Functions
fminbnd

Finding Function Minimum
tic,toc

MATLAB timer functions
bisect

Rootfinding Through Bisection
broyden

Broyden's Method
Trace

Matrix trace
ceil

Integer Functions (Matlab Style)
whittaker

Whittaker Smoothing
trigPoly

Trigonometric Polynomial
chebApprox

Chebyshev Approximation
disp,beep

Utility functions (Matlab style)
factors

Prime Factors
conv

Polynomial Convolution
ezplot

Easy Function Plot
fzsolve

Complex Root Finding
gaussNewton

Gauss-Newton Function Minimization
golden_ratio

Golden Ratio Search
fzero

Root Finding
givens

Givens Rotation
householder

Householder Reflections
interp1

One-dimensional Interpolation
approx_entropy

Approximate Entropy
abm3pc

Adams-Bashford-Moulton
isprime

isprime Property
legendre

Legendre Functions (Matlab Style)
inv

Matrix Inverse (Matlab Style)
akimaInterp

Univariate Akima Interpolation
cotes

Newton-Cotes Formulas
direct1d

Univariate Global Optimization
bvp

Boundary Value Problems
laplacian

Laplacian Operator
flipdim

Matrix Flipping (Matlab Style)
lsqlin

Linear Least-Squares Fitting
muller

Muller's Method
nnz

Nonzero Elements
curvefit

Parametric Curve Fit
circlefit

Fitting a Circle
einsteinF

Einstein Functions
numderiv

Richardson's Numerical Derivative
pinv

Pseudoinverse or Generalized Inverse
eta

Dirichlet Eta Function
expint

Exponential and Logarithmic Integral
perms

Generate Permutations
fresnelS/C

Fresnel Integrals
quad

Adaptive Simpson Quadrature
fibsearch

Fibonacci Search
hausdorff_dist

Hausdorff Distance
polyval

Evaluating a Polynomial
hooke-jeeves

Hooke-Jeeves Method
isempty

isempty Property
Rank

Matrix Rank
ratinterp

Rational Interpolation
regexprep

Replace string using regular expression
itersolve

Iterative Methods
segm_intersect

Segment Intersection
std

Standard Deviation (Matlab Style)
softline

Soft (Inexact) Line Search
triquad

Gaussian Triangle Quadrature
hurst

Hurst Exponent
lebesgue

Lebesgue Constant
kriging

Interpolation by Kriging
trapz

Trapezoidal Integration
lu

LU Matrix Factorization
logspace

Log-linearly Spaced Sequences
pade

Pade Approximation
polar

Polar Coordinate Plot (Matlab Style)
polylog

Polylogarithm Function
pracma-package

Practical Numerical Math Routines
poly2str

Print Polynomial
quadinf

Infinite Integrals
randcomb

Random Combination
randperm

Random Permutation
rationalfit

Rational Function Approximation
rortho

Generate Random Orthogogonal Matrix
std_err

Standard Error
sqrtm,rootm

Matrix Square and p-th Roots
taylor

Taylor Series Approximation
strjust

Justify character vector
strrep

Find and replace substring
tri

Triangular Matrices (Matlab Style)
trisolve

Tridiagonal Linear System Solver
and, or

Logical AND, OR (Matlab Style)
bsxfun

Elementwise Function Application (Matlab Style)
cart2sph

Coordinate Transformations
cond

Matrix Condition
crossn

n-dimensional Vector Cross Product
deg2rad

Degrees to Radians
cubicspline

Interpolating Cubic Spline
eigjacobi

Jacobi Eigenvalue Method
eye

Some Basic Matrices
fminsearch

Minimum Finding
gauss_kronrod

Gauss-Kronrod Quadrature
humps

Matlab Test Functions
hessian

Hessian Matrix
nchoosek

Binomial Coefficients
nelder_mead

Nelder-Mead Minimization Method
nextpow2

Next Power of 2
polyarea

Area of a Polygon
normest

Estimated Matrix Norm
pow2

Base 2 Power
rectint

Rectangle Intersection Areas
polyfit

Fitting by Polynomial
ridders

Ridders' Method
rref

Reduced Row Echelon Form
squareform

Format Distance Matrix (Matlab Style)
spinterp

Monotone (Shape-Preserving) Interpolation
strfind

Find Substrings
Toeplitz

Toeplitz Matrix
vectorfield

Vector Field Plotting
invperm

Inverse Permutation
agmean

Arithmetic-geometric Mean
brown72

Brownian Motion
chebCoeff

Chebyshev Polynomials
deconv

Deconvolution
deval

Evaluate ODE Solution
eig

Eigenvalue Function (Matlab Style)
expm

Matrix Exponential
findzeros

Find All Roots
fornberg

Fornberg's Finite Difference Approximation
findpeaks

Find Peaks
hadamard

Hadamard Matrix
hankel

Hankel Matrix
horner

Horner's Rule
coth,csch,sech, etc.

More Hyperbolic Functions
kmeanspp

K-means++ Clustering
integral2

Numerically Evaluate Double and Triple Integrals
invlap

Inverse Laplacian
grad

Numerical Gradient
linprog

Linear Programming Solver
hypot

Hypotenuse Function
mldivide

Matlab backslash operator
meshgrid

Generate a Mesh Grid
nearest_spd

Nearest Symmetric Positive-definite Matrix
moler

Moler Matrix
ode23

Runge-Kutta
piecewise

Piecewise Linear Function
primes

Prime Numbers
sigmoid

Sigmoid Function
rosser

Rosser Matrix
zeta

Riemann Zeta Function
size

Size of Matrix
geomean, harmmean

Geometric and Harmonic Mean (Matlab Style)
ellipke,ellipj

Elliptic and Jacobi Elliptic Integrals
charpoly

Characteristic Polynomial
aitken

Aitken' Method
blanks

String of Blank Carakters
detrend

Remove Linear Trends
ezcontour,ezmesh

Contour and Mesh Plotter
finds

find function (Matlab Style)
fplot

Plot Multivariate Function
ifft

Inverse Fast Fourier Transformation
histc

Histogram Count (Matlab style)
L1linreg

L1 Linear Regression
Norm

Vector Norm
nullspace

Kernel or Nullspace
pchip

Hermitean Interpolation Polynomials
neville

Neville's Method
pltcross

Plotting Crosses
newmark

Newmark Method
nthroot

Real nth Root
polyder

Derivative of Polynomial
procrustes

Solving the Procrustes Problem
quiver

Quiver or Velocity Plot
quad2d

2-d Gaussian Quadrature
regexp

Match regular expression
semilogx,semilogy

Semi-logarithmic Plots (Matlab Style)
simpson2d

Double Simpson Integration
sorting

Sorting Routines
strTrim

Remove leading and trailing white space.
cross

Vector Cross Product
compan

Companion Matrix
andrewsplot

Andrews' Curves
accumarray

Accumulate Vector Elements
blkdiag

Block Diagonal Matrix
combs

Generate Combinations
complexstep

Complex Step Derivation
dblquad

Double and Triple Integration
cd, pwd, what

Directory Functions (Matlab style)
barylag2d

2-D Barycentric Lagrange Interpolation
arclength

Arc Length of a Curve
barylag

Barycentric Lagrange Interpolation
deeve

Event Detection in ODE solution
cranknic

Crank-Nicolson Method
cutpoints

Find Cutting Points
gammainc

Incomplete Gamma Function
distmat

Distance Matrix
erf

Error Functions and Inverses (Matlab Style)
dot

Scalar Product
euler_heun

Euler-Heun ODE Solver
findintervals

Find Interval Indices
Diag

Matrix Diagonal
findmins

Find All Minima
fderiv

Numerical Differentiation
gcd, lcm

GCD and LCM Integer Functions
gaussHermite

Gauss-Hermite Quadrature Formula
fsolve

Solve System of Nonlinear Equations
ezpolar

Easy Polar Plot
fact

Factorial Function
gaussLaguerre

Gauss-Laguerre Quadrature Formula
fnorm

Function Norm
geo_median

Geometric Median
integral

Adaptive Numerical Integration
gaussLegendre

Gauss-Legendre Quadrature Formula
lambertWp

Lambert's W Function
kron

Kronecker product (Matlab Style)
polyint

Anti-derivative of Polynomial
inpolygon

Polygon Region
polymul

Multiplying Polynomials
romberg

Romberg Integration
gammaz

Complex Gamma Function
magic

Magic Square
linspace

Linearly Spaced Sequences
Reshape

Reshape Matrix
mod, rem

Integer Division
ndims

Number of Dimensions
plotyy

Plotting Two y-Axes
polyadd

Adding Polynomials
rk4, rk4sys

Classical Runge-Kutta
quadgk

Adaptive Gauss-Kronrod Quadrature
matlab

Matlab Compatibility
peaks

Peaks Function (Matlab Style)
psi

Psi (Polygamma) Function
roots

Polynomial Roots
rat

Continuous Fractions (Matlab Style)
quadcc

Adaptive Clenshaw-Curtis Quadrature
segm_distance

Segment Distance
refindall

Find overlapping regular expression matches.
str2num

Converting string to number (Matlab style)
repmat

Replicate Matrix
pascal

Pascal Triangle
trigApprox

Trigonometric Approximation
polypow

Polynomial Powers
cot,csc,sec, etc.

More Trigonometric Functions
wilkinson

wilkinson Matrix
Poly

Define Polynomial by Roots
rand

Create Random Matrices
savgol

Savitzky-Golay Smoothing
runge

Runge Function
sortrows

Sort Rows of a Matrix (Matlab Style)
titanium

Titanium Test Data
ppval

Piecewise Polynomial Structures
chebPoly

Chebyshev Polynomials
hilb

Hilbert Matrix
newtonRaphson

Rootfinding through Newton-Raphson or Secant.
newtonsys

Newton Method for Nonlinear Systems
numel

Number of Elements
orth

Range Space
ppfit

Piecewise Polynomial Fit
quadv

Vectorized Integration
simpadpt

Adaptive Simpson Quadrature
subspace

Angle between two subspaces
steepest_descent

Steepest Descent
brent_dekker

Brent-Dekker Root Finding Method
gmres

Generalized Minimal Residual Method
gramSchmidt

Gram-Schmidt
errorbar

Plot Error Bars
fletcher-powell

Davidon-Fletcher-Powell Method
gradient

Discrete Gradient (Matlab Style)
mexpfit

Multi-exponential Fitting
newtonInterp

Lagrange and Newtons Interpolation
polytrans

Polynomial Transformation
qrSolve

LSE Solution
vander

Vandermonde matrix