| NEWS | R Documentation |
quadcc() iterative/adaptive Clenshaw-Curtis quadrature.
squareform() formats distance matrix (Matlab style).
integral2() implements the two-dimensional numerical integration
approach ‘TwoD’,
i.e. Gauss-Kronrod (3, 7)-points on rectangles.
integral3() three-dimensional integration based on integral2().
triplequad() 3-dim. integration based on dblquad() (Matlab style).
integral() combines adaptive numerical integration procedures.
cintegral() complex line integrals (rectangles and curves).
linprog() linear programming solver for linear equality and inequality constraints.
romberg() Romberg integration completely rewritten.
idivide() integer division with different roundings.
fderiv(), taylor() expanded to higher orders.
itersolve() iteration methods for solving linear systems.
lu() LU decomposition with different schemes (w/o pivoting).
pdist() as an alias for distmat() (Matlab style).
fftshift(), ifftshift() shifting Fourier frequencies.
Improved grad(), jacobian(), hessian(), and laplacian().
Smaller corrections; no startup messages anymore.
geomean(), harmmean(), trimmean() geometric, harmonic, and trimmed arithmetic mean (Matlab style).
agmean() algebraic-geometric mean.
mexpfit() multi-exponentiell fitting.
lsqsep() separable least-squares fitting.
lsqcurvefit() nonlinear least-squares curve fitting.
cd(), pwd() directory functions (Matlab style).
rand(), randn() changed to accept size() as input.
whos(), what() corrected for empty lists resp. directories.
what(), who(), whos(), ver() (Matlab style).
semilogx(), semilogy(), loglog() logarithmic plots (Matlab style)
quadv() vectorized integration.
ezpolar() easy access to the polar() function.
sortrows() sorting rows of matrices (Matlab style).
null() alias for nullspace function (Matlab style).
eigjacobi() Jacobi's method for eigenvalues and eigenvectors.
ellipke(), ellipj() elliptic and Jacobi elliptic integrals.
expint() implements E1 and Ei, the exponential integrals, with aliases expint_E1() and expint_Ei().
li() the logarithmic integral (w/o offset).
Explicitely listing about 200 Matlab-emulating function names.
Dismissed matlab(), using it now for infos only, not assigning Matlab function names to the environment (because of CRAN policies).
cot(), csc(), sec() cotangens, cosecans, and secans functions.
acot(), acsc(), asec() inverse cotangens, cosecans, secans.
coth(), csch(), sech() hyperbolic cotangens, cosecans, secans.
acoth(), acsch(), asech() inverse hyperbolic cotangens, cosecans, and secans functions.
bvp() changed to solve second order boundary value problems.
trisolve() solves tridiagonal linear equation systems.
curvefit() fits points in the plane with a polynomial curve.
lsqlin() least-squares solver with linear equality constraints.
pinv() now works like MASS::ginv() for singular matrices.
Added the end-';' feature to str2num().
toc() added invisible return value.
procrustes() solving the Procrustes problem, and kabsch() implements the Kabsch algorithm.
kriging() ordinary and simple Kriging interpolation.
Corrected some stupid errors in str2num().
akimaInterp() univariate Akima interpolation.
Moved transfinite() to package 'adagio'.
histc() Histogram-like counting (Matlab style).
Added warning to complexstep() if imaginary part is zero.
Added option 'pinv' to mldivide() to return the same results as Matlab.
str2num(), num2str() conversion functions (Matlab style).
Removed some 'author' entries on help pages.
Renamed mrank() to Rank().
Corrected nullspace() [thanks to Stephane Laurent], which now agrees with Octave's null() function (MASS:Null appears buggy, too).
Corrected gaussNewton() and fsolve() [thanks to Etienne Chamayou].
bsxfun() apply binary function elementwise (Matlab style).
added the analytic solution for the example in bvp().
rosenbrock() added, moved testfunctions to 'adagio' package.
euler_heun() improved Euler method for solving ODEs.
logit() function added to sigmoid().
Keyword 'ode' introduced.
matlab() can reinstall Matlab function names.
gcd(), lcm() greatest common divisor, least common multiple now working on a vector of integers.
Removed number-theoretic functions: eulersPhi(), moebiusFun(), mertensFun(), sigma(), tau(), omega(), Omega(), primes2(), twinPrimes(), nextPrime(), previousPrime(), modpower(), modorder(), modinv(), modlin(), primroot(), contfrac(), coprime(), GCD(), LCM(), extGCD(), (these functions are now available in the 'numbers' package).
ezcontour(), ezmesh() wrappers for contour(), image(), persp().
erfi() imaginary error function.
moler() Moler matrix
Removed '.Rapphistory' from the tests directory (again) [and use "–as-cran" for the checks].
disp() display text or array (Matlab Style), cat() with newline.
Renamed functions with capital first letter to avoid name clashes: And/Or, mtrace -> Trace, mdiag -> Diag, strtrim -> strTrim, reshape -> Reshape, find -> Find, fix -> Fix, mode -> Mode, real -> Real, imag -> Imag, hadamard -> Hadamard, toeplitz -> Toeplitz, poly -> Poly.
gammainc() (lower and upper) incomplete gamma function, also the regularized gamma function, all allowing negative x values.
polylog() the polylogarithm functions for |z| < 1 and n >= -4 .
fminsearch() implements Nelder-Mead (similar to optim), and Fletcher-Powell when “dfree=FALSE” is chosen.
Test functions rosenbrock(), rastrigin(), and many more.
nelder_mead() implements Nelder-Mead for nonlinear optimization.
hooke-jeeves() Hooke-Jeeves algorithm for direct search.
fletcher_powell() Davidon-Fletcher-Powell method for function minimization (alternative to BFGS approach).
steepest_descent() minimization of functions using steepest descent.
fminbnd() implements Brent's function minimization algorithm with golden section search and parabolic interpolation (same as optimize).
transfinite() transformation function between bounded and unbounded (box constraint) regions.
renamed brentDekker() to brent_dekker
hurst(), hurstexp() calculate the Hurst exponent of a time series.
Updated the NEWS.Rd file.
lsqnonneg() solves nonnegative least-squares problems by using the trick “x –> exp(x)" and applying lsqnonlin(); example function lsqcurvefit() for nonlinear curve fitting.
Renamed ridder() to ridders(), thanks to Robert Monfera for pointing it out (he also suggested a multi-dimensional variant).
movavg() moving average of types “simple", “weighted", “modified", “exponential" (EMA), or “triangular".
modlin() solves modular linear equations.
lsqnonlin() solves nonlinear least-squares problems using the Levenberg-Marquardt approach.
renamed froots() to findzeros(), and fmins() to findmins().
fornberg() finite difference (i.e., polynomial) approximation of derivatives for unevenly spaced grid points – Fornberg's method.
randsample() randomly sampling, alias for sample (Matlab style).
rands() generates uniform random points on an N-sphere.
Added tic(), toc() measuring elapsed time (Matlab style).
previousPrime() finds the next prime below a number.
invlap() computes the inverse Lapacian numerically.
ppfit() piecewise polynomial fitting procedure.
cubicspline() interpolating cubic spline (w/ endpoint conditions).
mkpp() and ppval() for piecewise polynomial structures.
accumarray() resembles the related Matlab function more closely.
invperm() returns the inverse of a permutation.
randperm() changed to make it more Matlab-like.
plotyy() corrected right ordinate, prettying the labels.
peaks() peaks function (Matlab style).
Updated the NEWS.Rd file.
qrSolve solves overdetermined system of linear equations.
DSCsearch() removed, now in package ‘pracopt’.
randp() found a better, non-selective approach.
gramSchmidt() modified Gram-Schmidt process.
householder() Householder reflections and QR decomposition.
givens() Givens rotation and QR decomposition.
corrected a small error in ridder() (thanks to Roger Harbord).
erf() corrected, erfc() and erfcx() as new functions, including their inverses erfinv() and erfcinv().
hypot() now numerically more stable (thanks to Jerry Lewis).
Changed third example for dblquad() [new Windows toolchain problem].
Deactivated the test for gammaz() because of problems on Solaris.
kmeanspp() kmeans++ clustering algorithm.
savgol() and hampel() with new options, fuelled by a blog entry of Ron Pearson in his ExploringDataBlog.
DSCsearch() Davies-Swann-Campey search in one dimension.
Improved modpower() through modular exponentiation. Added lehmann_test() Lehmann's primality test as example.
Corrected polar() and andrewsplot().
direct1d() one-dimensional version of the DIRECT algorithm for global function minimization.
ApEn() approximate entropy of a time series.
circshift() circularly shifting arrays (Matlab Style).
plotyy() plots curves with y-axes on both left and right side.
fplot() plots components of a multivariate function.
errorbar() routine for plotting error bars in both directions.
Whittaker-Henderson smoothing ** Not yet running** .
rref() reduced row echelon form.
cutpoints() automatically finds cutting points based on gaps.
hausdorff_dist calculates the Hausdorff distance / Hausdorff dimension.
nnz() number of non-zeros elements (Matlab style).
polar() for polar plots (Matlab style), see the example plots.
andrewsplot() plots Andrews curves in polar coordinates.
Vectorized: cart2sph(), sph2cart(), cart2pol(), pol2cart().
deg2rad(), rad2deg()
figure() Matlab style, and pltcross() plotting crosses.
ridder() Ridder's method for zero finding of univariate functions.
sqrtm() matrix square root, based on Denman-Beavers iteration, rootm() matrix p-th root, computing a complex contour integral, signm() matrix sign function.
fzero() now uses the new zeroin() function, i.e., a Brent-Dekker approach instead of refering to uniroot().
twinPrimes() twin primes in a given interval, and nextPrime
will find the next higher prime.
Transformations between cartesian, spherical, polar and cylindrical coordinate systems: cart2sph(), sph2cart(), cart2pol(), pol2cart().
polar() uniformly random points in the unit circle (till Matlab 5).
accumarray() grouping elements and applying a function to each group.
uniq() Matlab-style ‘unique’ function, allsums() in the examples.
small correction to fsolve(), mentioned on the ‘check summary’ page.
newmark() Newmark's method for solving second order differential equations of the form y”(t) = f(t, y(t), y'(t)) on [t1, t2].
cranknic() Crank-Nicolson ‘ivp’ solver, combining the forward and backward Euler methods for ordinary differential equations.
Corrected pinv() for (nearly) singular matrices.
Renamed ifactor() to factors().
Minor corrections and improvements to the ‘pracma.pdf’ manual, incl. numdiff(), refindall(), trigApprox(), and subspace().
spinterp() monotonic (and later on shape-preserving) interpolation following the approach of Delbourgo and Gregory.
bvp() solves boundary value problems of the following kind:
-u”(x) + c1 u'(x) + c2 u(x) = f(x) for x in [a, b].
primes2(n1, n2) will return all prime numbers betweeen n1 and n2 (without storing the numbers from sqrt(n2) up to n1).
gaussNewton() for function minimization and solving systems of nonlinear equations. fsolve() as a wrapper for it.
fzsolve() for root finding of complex functions.
softline() Fletcher's inexact linesearch algorithm.
Put NEWS.Rd in the /inst subdirectory (and NEWS.pdf in /doc), thanks to Kurt Hornik; slightly changed the version numbering.
rortho() generate random orthogonal matrix of size n.
Titanium data set for testing fitting procedures.
erf() and erfc() error and complementary error functions (Matlab style) as (almost) aliases for pnorm().
erfz() complex error function.
broyden() quasi-Newton root finding method for systems of nonlinear equations.
cross() has been vectorized (remark on R-help).
Sigmoid and Einstein functions.
Runge-Kutta-Fehlberg method of order (5,4).
triquad() Gaussian quadrature over triangles.
cotes() Newton-Cotes integration formulae for 2 to 8 nodes.
lagrangeInterp(), newtonInterp() Lagrange and Newton polynomial interpolation, neville() Neville's methods.
tril(), triu() extracting triangular matrices (Matlab style).
charpoly() computes the characteristic polynomial, the determinant, and the inverse for matrices that are relativly small, applying the Faddejew-Leverrier method.
froots() to find *all* roots (also of second or higher order) of a univariate function in a given interval. The same with fmins() to find all minima.
Adams-Bashford and Adams-Moulton (i.e., multi-step) methods for ordinary differential equations in function abm3pc().
Changed the description to be more precise about the package.
rationalfit() rational function approximation
ratinterp() rational interpolation a la Burlisch-Stoer.
pade() Pade approximation.
quadgk() adaptive Gauss-Kronrod quadrature.
muller() Muller's root finding method.
Added differential equation example to expm()'s help page.
Changed NEWS file to become simpler (no subsections).
quadl() recursive adaptive Gauss-Lobatto quadrature.
simpadpt() another recursively adaptive Simpson's rule.
Added testing procedures for all integration routines; corrected, refined some of these procedures.
quadgr() Gaussian Quadrature with Richardson extrapolation, can handle singularities at endpoints and (half-)infinite intervals.
expm() for matrix exponentials.
clenshaw_curtis() the Clenshaw-Curtis quadrature formula.
simpson2d() as non-adaptive 2-dimensional Simpson integration.
dblquad() twofold application of internal function integrate().
gaussHermite() and gaussLaguerre() for infinite intervals.
Fresnel integrals fresnelS() and frenelC().
gaussLegendre() computes coefficients for Gauss Quadrature, and quad2d() uses these weights for 2-dimensional integration.
quadinf() wrapper for integrate() on infinite intervals.
ode23() solving first order (systems of) differential equations.
barylag2d() 2-dimensional barycentric Lagrange interpolation.
interp2() for two-dimensional interpolation.
gradient() now works in two dimensions too.
fzero(), fminbnd(), fminsearch(), fsolve() as aliases for uniroot(), optimize(), optim() with Nelder-Mead, newtonsys().
Corrections to help pages.
romberg() and gauss_kronrod() for numerical integration.
Richardson's extrapolation in numderiv(), numdiff().
Discrete numerical derivatives (one dimension): gradient().
Numerical function derivatives: fderiv(), grad().
Specialized operators: hessian(), laplacian().
Application: taylor().
plot vector fields: quiver() and vectorfield().
findintervals().
Corrections in deval(), deeve(), using findintervals().
Laguerre's method laguerre().
rk4() and rk4sys() classical fourth order Runge-Kutta.
deval(), deeve() evaluate ODE solutions.
Lebesgue coefficient: lebesgue().
poly2str() for string representation of a polynomial.
Dirichlet's eta() and Riemann's zeta() function.
rmserr() different accuracy measures; std_err() standard error.
polypow() and polytrans() for polynomials.
polyApprox() polynomial approximation using Chebyshev.
trigPoly(), trigApprox() for trigonometric regression.
segm_intersect() and segm_distance() segment distances.
inpolygon().
polyadd() polynomial addition.
conv() and deconv() time series (de)convolution.
detrend() removes (piecewise) linear trends.
ifft() for normalized inverse Fast Fourier Transform.
Added tests for functions since version 0.3-7.
and() and or().
pchip() and option ‘cubic’ for interp1() interpolation.
The complex gamma functions gammaz().
hadamard() and toeplitz() matrices.
Rank of a matrix, mrank(), and nullspace() for the kernel.
orth(), orthogonal basis of the image space, and subspace() determines the angle between two subspaces.
normest() for estimating the (Frobenius) norm of a matrix, and cond() determines the condition number of a matrix.
fact(), more accurate than the R internal function ‘factorial’.
ezplot() as an alias for curve(), but with option “fill = TRUE”.
aitken() for accelerating iterations.
Renamed polycnv() to polymul().
Renamed outlierMAD() to hampel().
Lambert W function lambertWp() for the real principal branch.
“Complex Step” derivation with complexstep() and complexstepJ().
Barycentric Lagrange interpolation through barylag().
polyfit2() fits a polynomial that exactly meets one additional point.
Added more references to the help entry ‘pracma-package.Rd’.
hornerdefl() for also returning the deflated polynomial.
newtonHorner() combining Newton's method and the Horner scheme for root finding for polynomials.
jacobian() computes the Jacobian of a function R^n –> R^m as simple numerical derivative.
newtonsys() applies Newton's method to functions R^n –> R^n with special application to root finding of complex functions.
newton() renamed to newtonRaphson().
Sorting functions: bubbleSort(), insertionSort(), selectionSort(), shellSort(), heapSort(), mergeSort(), mergeOrdered(), quickSort(), quickSortx(), is.sorted(), and testSort().
Functions from number theory: eulersPhi(), moebiusFun() and the mertensFun(), sigma(), tau(), omega(), and Omega().
Chebyshev polynomials of the first kind: chebPoly(), chebCoeff(),and chebApprox().
New version of news.Rd, news.pdf.
More test functions for root finding and quadrature.
fnorm() and the Runge function runge().
contfrac(), rat(), and rats() for continuous fractions.
meshgrid() and magic().
quad() adaptive Simpson quadrature.
Minimum finding with fibsearch() and golden_ratio().
Root finding with newton(), secant(), and brentDekker().
Regular expression functions regexp(), regexpi(), regexprep() and refindall().
String functions blanks(), strtrim(), deblank(), strjust(), and strrep().
interp1() one-dimensional interpolation (incl. spline)
Matlab functions mode(), clear() and beep().
primroot() finds the smallest primitive root modulo a given n; needed functions are modpower() and modorder().
humps() and sinc(): Matlab test functions.
Root finding through bisection: bisect(), regulaFalsi().
outlierMAD(), findpeaks(), and piecewise().
polycnv() for polynomial multiplication.
Functions extgcd(), gcd(), and lcm() have been renamed to extGCD(), GCD(), and LCM() respectively.
strfind(), strfindi(), and findstr().
circlefit() fitting a circle to plane points.
mldivide() and mrdivide(), emulating the Matlab backslash operator.
vnorm() vector norm
Warning about a nasty “non-ASCII input” in the savgol.RD file has been resolved.
horner() implementing the horner scheme for evaluating a polynomial and its derivative.
savgol() Savitzki-Golay smoothing and needed pseudoinverse pinv().
Package renamed to ‘pracma’ to avoid name clashes with packages such as ‘matlab’ that are sticking closer to the original.
Added ‘pracma-package’ section to the manual.
reshape(), repmat(), and blkdiag() matrix functions.
combs() chooses all combinations of k elements out of n, and randcomb() generates a random selection.
perms() generates all permutations, randperm() a random permutation.
Pascal triangle as pascal(); nchoosek() returns binomial coefficients.
Some string functions: strcmp(), strcmpi(), strcat().
std() as refinement of the standard deviation function.
ceil() and fix() as aliases for ceiling() and trunc(). [floor() and round() already exist in R.]
Modulo functions mod(), rem() and integer division idiv().
Integer functions related to the Euclidean algorithm: extgcd(), gcd(), lcm(), coprime(), and modinv().
distmat() and crossn(), the vector product in n-dimensional space.
size(), numel(), ndims(), isempty(), and find().
eye(), ones(), zeros().
Functions returning random numbers: rand(), randn(), randi().
linspace(), logspace(), and logseq() for linearly, logarithmically,
and exponentially spaced sequences.
Note that the functions in the ‘matlab’ package are not exactly
mimicking the corresponding Matlab/Octave functions.
Matrix functions mdiag() and mtrace() added. inv() is introduced as an alias for solve() in R.
Generate special matrices hankel(), rosser(), and wilkinson(). kron() is an alias for the R function kronecker().
Renamed factors() to ifactor() to distiguish it more clearly from factors as used in R.
Added functions for flipping or rotating numeric and complex matrices: flipdim(), flipud(), fliplr(), and rot90().
Added basic complex functions real(), imag(), conj(), and angle()
which are essentially only aliases of the R functions Re(), Im(),
and Conj().
angle() returns the angle of a complex number in radians.
The R function Mod() is here only available as abs().
Added compan() function for the ‘companion’ matrix; the eig() function is an alias for the R eigen()values function.
Added the polynomial functions poly(), polyder(), polyfit(), polyint(), and polyval().
roots() returns real and complex roots of polynomials.
Simplified the trapz() function.
Added functions from number theory: primes(), isprime() and factors().
The corresponding function for factors() in Matlab/Octave is called factor(), but that name should not be shadowed in R!
Added the polyarea() and trapz() functions.
Added some simple functions such as nthroot(), pow2(), and nextpow2().
dot() and cross() functions for scalar and vector product.
Generate matrices through vander() and hilb().
Installation
‘pracma’ will be a pure R package without using source code in C or Fortran. Therefore, installation will be immediate on all platforms.
Intention
This package provides R implementations of more advanced math functions from Matlab and Octave (and the Euler Math Toolbox) with a special view on optimization and time series routines.
Remark: Typeset this document as:
R CMD Rd2pdf NEWS.Rd --title="NEWS for pracma version 1.4.5".