image thumbnail

updated 3 months ago

Moving window standard deviation by John D'Errico

A (fast) windowed std on a time series (standard deviation, std, window)

movingstd(x,k,windowmode)

image thumbnail

updated 6 months ago

HPF - a big decimal class by John D'Errico

High precision floating point arithmetic, a new class written in MATLAB (hpf, multiple precision, big decimal)

Demo script for my High Precision Floating point decimal

hpf_regression_testing

DefaultDecimalBase(DBaseNew)

image thumbnail

updated 9 months ago

Variable Precision Integer Arithmetic by John D'Errico

Arithmetic with integers of fully arbitrary size. Arrays and vectors of vpi numbers are supported. (integer, biginteger, arithmetic)

demo_vpi

base2vpi(B,base)

bin2vpi(B)

image thumbnail

updated 9 months ago

nearestSPD by John D'Errico

Finding the nearest positive definite matrix (positive definite mat..., covariance matrix, covariance)

nearestSPD_demo

nearestSPD(A)

image thumbnail

updated 1 year ago

distance2curve by John D'Errico

Find the closest point on a (n-dimensional) curve to any given point or set of points (nearest, closest, distance)

distance2curve(curvexy,mapxy,interpmethod)

image thumbnail

updated 1 year ago

Inverse (integrated) gradient by John D'Errico

Vectorized & fully sparse 1-d, 2-d, & 3-d integrated gradients (integration, cumulative, gradient)

consolidator(x,y,aggregation_mode,tol)

intgrad1(fx,dx,f1,method)

intgrad2(fx,fy,dx,dy,f11)

image thumbnail

updated 1 year ago

Inhull by John D'Errico

Efficient test for points inside a convex hull in n dimensions (convex hull, inhull, hull)

inhull(testpts,xyz,tess,tol)

image thumbnail

updated 1 year ago

IPDM: Inter-Point Distance Matrix by John D'Errico

An efficient and accurate Inter-Point Distance Matrix (distance, interpoint, distances)

demo_ipdm

ipdm(data1,varargin)

image thumbnail

updated 1 year ago

interparc by John D'Errico

Distance based interpolation along a general curve in space (interpolation, spline, linear)

interparc(t,px,py,varargin)

image thumbnail

updated 1 year ago

inpaint_nans by John D'Errico

Interpolates (& extrapolates) NaN elements in a 2d array. (nan, inpainting, replace)

(nn(:,1)<1)|(nn(:,1)>n)|(nn(:,2)<1)|(nn(:,2)>m); nn(L,...

valid{ind}; end end

inpaint_nans_demo.m

image thumbnail

updated almost 2 years ago

The Fibonacci Sequence by John D'Errico

Efficient computation of Fibonacci and Lucas numbers (fibonacci, lucas, numbers)

fibonacciEvolution

fibonacci(n,modulus)

fibrecur(N)

image thumbnail

updated almost 2 years ago

FresnelS and FresnelC by John D'Errico

Efficient and accurate computation of the Fresnel sine and cosine integrals (fresnel, sine, cosine)

fresnelC(X,fresnelType)

fresnelS(X,fresnelType)

image thumbnail

updated 2 years ago

SLM - Shape Language Modeling by John D'Errico

Least squares spline modeling using shape primitives (spline, splines, cubic)

slm_tutorial

hermite2slm(harray)

lse(A,b,C,d,solverflag,weights)

image thumbnail

updated 2 years ago

fminsearchbnd, fminsearchcon by John D'Errico

Bound constrained optimization using fminsearch (optimization, fminsearch, constraint)

fminsearchbnd_demo

fminsearchcon_demo

[x,fval,exitflag,output]=fminsearchcon(fun,x0,LB,UB,A,b,n...

image thumbnail

updated 2 years ago

arclength by John D'Errico

Compute the arclength of a general curve in any number of dimensions (arclength, spline, curve)

arclength(px,py,varargin)

image thumbnail

updated 2 years ago

A suite of minimal bounding objects by John D'Errico

Suite of tools to compute minimal bounding circles, rectangles, triangles, spheres, incircles, etc. (miminum, bound, bounding)

incircle(x,y)

insphere(xyz,tri)

minboundcircle(x,y,hullflag)

image thumbnail

updated 2 years ago

putvar, uigetvar by John D'Errico

Move (get or put) variable(s) directly between a function workspace and the base workspace (variable, assign, assignin)

putvar(varargin)

uigetvar(variableclass)

image thumbnail

updated 2 years ago

User Defined Constants by John D'Errico

Define your own special constants

Demo for the User Defined Constants capability in MATLAB

defcon(ConstantName,Value,Description)

image thumbnail

updated 2 years ago

polyfitn by John D'Errico

Polynomial modeling in 1 or n dimensions (polyfit, modeling, regression)

polyfitn_demo

polydern(p,diffvar)

polyfitn(indepvar,depvar,modelterms)

image thumbnail

updated almost 3 years ago

Adaptive Robust Numerical Differentiation by John D'Errico

Numerical derivative of an analytically supplied function, also gradient, Jacobian & Hessian (adaptive, differentiation, automatic)

derivest_demo

multivariable_calc_demo

derivest(fun,x0,varargin)

image thumbnail

updated almost 3 years ago

Optimization Tips and Tricks by John D'Errico

Tips and tricks for use of the optimization toolbox, linear and nonlinear regression. (optimization, examples, tutorial)

optimtips

[x,fval,exitflag,output]=fminsearchbnd(fun,x0,LB,UB,optio...

consolidator(x,y,aggregation_mode,tol)

image thumbnail

updated 3 years ago

INTERPNS by John D'Errico

N-dimensional simplicial interpolation (interp2, interpolation, interpolant)

interpns(V,Xi,nodelist,method)

image thumbnail

updated 3 years ago

Symbolic Polynomial Manipulation by John D'Errico

Symbolic polynomial manipulation as an exercise in OOP

Sympoly_demos

[nodes,weights]=gaussquadrule(n,class,alpha,beta)

adjoint(A)

image thumbnail

updated 3 years ago

spheresegmentvolume by John D'Errico

Volume of a (hyper)sphere, sphere cap, or any band through a sphere defined by two parallel planes

spheresegmentvolume(t,n,radius)

image thumbnail

updated 3 years ago

Surface Fitting using gridfit by John D'Errico

Model 2-d surfaces from scattered data (approximation, interpolation, modeling)

gridfit_demo

gridfit(x,y,z,xnodes,ynodes,varargin)

test_main.m

image thumbnail

updated almost 4 years ago

LSE by John D'Errico

A linear least squares solver, subject to linear equality constraints (least squares, regression, linear regression)

lse(A,b,C,d,solverflag,weights)

image thumbnail

updated almost 4 years ago

String subsequence tools by John D'Errico

Identify common substrings of a pair of strings

commonsubstring(str1,str2,substringlength)

substrings(str,nsub,uniqueflag)

image thumbnail

updated 4 years ago

allwords by John D'Errico

Parse a sentence or any string into distinct "words" (string, char, words)

allwords(str,sepchars)

image thumbnail

updated 4 years ago

factorpairs by John D'Errico

Generate all pairs of factors N = p*q, p <= q, for positive integer N (factor, factors, divisors)

factorpairs(N)

image thumbnail

updated 4 years ago

nthprime by John D'Errico

Finds either the n'th prime, or compute the number of primes that are less than some given value.

nthprime(N,opmode)

image thumbnail

updated 4 years ago

MIN2, MAX2 by John D'Errico

Global min or max value of a 2-d array, the search may be limited to specified rows or columns

max2(M,userows,usecols)

min2(M,userows,usecols)

image thumbnail

updated 4 years ago

binomfactors by John D'Errico

Returns a factored form for very large binomial coefficients

binomfactors(n,k)

image thumbnail

updated almost 5 years ago

nextprime by John D'Errico

For any given number (also vpi numbers), find the next prime number in the sequence of primes.

nextprime(N,direction)

image thumbnail

updated almost 5 years ago

The divisors of a number, perfect, amicable, and sociable numbers by John D'Errico

Tools to work (and play) with the divisors of a number (divisors, aliquot parts, aliquot sum)

The aliquot parts of a number

aliquotparts(N)

aliquotsum(N,p)

image thumbnail

updated 5 years ago

Eigenshuffle by John D'Errico

Consistently sorted eigenvalue and eigenvector sequences (eigenvalues, eig, order)

eigenshuffle(Asequence)

image thumbnail

updated 5 years ago

Circulant matrix by John D'Errico

The circulant matrix generated from a vector as the first row (or first column) (circulant, matrix, toeplitz)

circulant(vec,direction)

image thumbnail

updated 5 years ago

Inpainting nan elements in 3-d by John D'Errico

An extension of inpaint_nans to 3 dimensions

inpaint_nans3_demo

(nn(:,1)<1) | (nn(:,1)>NA(1)) | ... (nn(:,2)<1) | (...

image thumbnail

updated almost 6 years ago

Partitions of an integer by John D'Errico

List all partitions of an integer (partitions, integer, partition)

partitions_demo

partitions(total_sum,candidate_set,max_count,fixed_count)

image thumbnail

updated almost 6 years ago

Fminspleas by John D'Errico

Efficient nonlinear regression fitting using a constrained, partitioned least squares overlay to fmi

fminspleas(funlist,NLPstart,xdata,ydata,INLB,INUB,weights...

image thumbnail

updated almost 6 years ago

Adaptive numerical limit estimation by John D'Errico

Numerical extrapolation of a limit (with an error estimate) from only function values

Demo of limest

How does limest work?

limest(fun,z0,varargin)

image thumbnail

updated 6 years ago

mgrep by John D'Errico

Returns the names of all m-files in a directory or directory tree that contain a search string.

mgrep(searchstring,startpath,varargin)

image thumbnail

updated 6 years ago

(Block) tri-diagonal matrices by John D'Errico

Generate (block) tridiagonal matrices (block diagonal, tridiagonal, matrices)

blktridiag_demo

blktridiag(Amd,Asub,Asup,n)

image thumbnail

updated 6 years ago

Estimatenoise by John D'Errico

Noise variance estimation from a signal vector or array (noise, variance, estimation)

estimatenoise(X,varargin)

image thumbnail

updated 6 years ago

Movingslope by John D'Errico

Sliding window regression to compute slope estimates along a curve (slope, moving, sliding)

movingslope(vec,supportlength,modelorder,dt)

image thumbnail

updated 6 years ago

Consolidator by John D'Errico

Consolidates common elements in x (may be n-dimensional), aggregating corresponding y. (reduction, accumarray, interpolation)

consolidator(x,y,aggregation_mode,tol)

consolidator13(x,y,aggregation_mode,tol,tolerance_style)

consolidator13(x,y,aggregation_mode,tol,tolerance_style)

image thumbnail

updated 7 years ago

RMSEARCH by John D'Errico

Randomly multiply started optimizations for global problems

RMSEARCH demos

rmsearch(fun,optname,x0,LB,UB,varargin)

image thumbnail

updated 7 years ago

Incremental growth of an array, revisited by John D'Errico

Efficient dynamic growth of an array by concatenation.

growdata_demo

A=growdata(newdata)

funH=growdata2(appendmode,blocksize)

image thumbnail

updated 7 years ago

Graphical data selection tool by John D'Errico

A graphical tool to modify your plots and locate data points

selectdata(varargin)

image thumbnail

updated 7 years ago

Color name identification: fuzzycolor by John D'Errico

Efficient identification of color names for any RGB

fuzzycolor_demo

[iscolor,colornames]=fuzzycolor(RGB,colorquery)

buildfuzzyluts(colorname)

image thumbnail

updated almost 8 years ago

Nonlinear Regression Shapes by John D'Errico

Curve fitting, empirical modeling, and an appreciation of shape (regression, nonlinear regression, shape)

fminspleas(funlist,NLPstart,xdata,ydata,INLB,INUB,options)

bestiary.m

shapes.m

Contact us