numbl includes more than 600 built-in functions. Run numbl list-builtins on the command line for the full list.
sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, sind, cosd, tand, sec, csc, cot, and their inverses.
exp, log, log2, log10, log1p, pow2, sqrt
real, imag, conj, angle, complex, hypot
abs, floor, ceil, round, fix, sign
erf, erfc, erfinv, erfcinv, gamma, gammaln, beta, airy, bessel functions, legendre, ellipj
zeros, ones, eye, rand, randi, randn, randperm, linspace, logspace, colon
reshape, squeeze, permute, repmat, repelem, cat, horzcat, vertcat, flip, fliplr, flipud, rot90, circshift
size, length, numel, ndims, isempty, isscalar, isvector, ismatrix
sum, prod, mean, median, std, var, min, max, all, any, cumsum, cumprod, cummax, cummin
inv, pinv, det, trace, rank, cond, rcond, norm, vecnorm, eig, eigs, svd, lu, qr, qz, chol, expm, kron, linsolve, mldivide, mrdivide, gmres, null, dot, cross, tril, triu, blkdiag, toeplitz, decomposition, isIllConditioned, istriu, istril, isbanded, bandwidth
fft, ifft, fftshift, ifftshift
poly, polyfit, polyval, roots, conv, deconv, mkpp, ppval
unique, union, intersect, setdiff, ismember, uniquetol
sort, sortrows, mode
sprintf, strcmp, strcmpi, strncmp, strncmpi, strfind, strrep, strsplit, strjoin, strtrim, strip, strcat, strtok, strlength, deblank, blanks, newline, upper, lower, contains, startsWith, endsWith, replace, erase, count, reverse, pad, split, join, extractBefore, extractAfter, extractBetween, insertBefore, insertAfter, regexp, regexpi, regexprep
isnumeric, isfloat, isinteger, islogical, ischar, isstring, iscell, isstruct, isreal, isfinite, isinf, isnan, issparse
double, single, logical, char, string, cellstr, cast, typecast, num2str, str2double, str2num, int2str, mat2str, dec2bin, bin2dec, dec2hex, hex2dec, func2str, str2func. single gives a distinct single-precision class; int8, ..., uint64 round and saturate but return doubles (see Differences from MATLAB).
mustBeNumeric, mustBeFinite, mustBeInteger, mustBePositive, mustBeNonempty, mustBeInRange, mustBeMember, mustBeVector and the other mustBe* functions, validateattributes, narginchk, nargoutchk, inputParser (addRequired, addOptional, addParameter, parse)
sparse, speye, spdiags, spconvert, spalloc, full, nnz, nonzeros, sprand, sprandn, sprandsym, symrcm, amd, colamd. chol, lu, kron, inv and \ work directly on sparse matrices (see Differences from MATLAB).
fieldnames, rmfield, cell2mat, cell2struct, struct2cell, num2cell, mat2cell, deal
interp1, meshgrid, ndgrid
delaunay, delaunayn, triangulation, convhull, convhulln, inpolygon, cart2pol, pol2cart, cart2sph, sph2cart
graph, addedge, numnodes, numedges, degree, conncomp, laplacian
diff, gradient, trapz, cumtrapz, quadgk
ode45, ode23, odeset, odeget, deval
fopen, fclose, fread, fwrite, fgetl, fgets, fscanf, sscanf, fileread, readmatrix, feof, fseek, ftell, dir, mkdir, delete, rmdir, copyfile, movefile, exist, isfile, isfolder, pwd, cd, fileparts, fullfile, tempdir, tempname, zip, unzip
webread, websave, weboptions, jsonencode, jsondecode
disp, fprintf, sprintf, warning, error, assert
tic, toc, clock, etime
datetime, datestr, now, and the durations days, hours, minutes, seconds
eval, evalin, assignin, feval, builtin
arrayfun, cellfun, structfun, bsxfun
pagemtimes, pagetranspose
dictionary, keys, values, entries, lookup, insert, remove, isKey, isConfigured, numEntries, configureDictionary, types
gpuArray, gather, gpuDevice, gpuDeviceCount, canUseGPU, existsOnGPU, isgpuarray, underlyingType
gpuArray(X) moves an array to a GPU, where operators and functions run on the device and return gpuArrays; gather brings the result back. In the browser numbl uses WebGPU. On the command line it uses WebGPU when the optional webgpu npm package is installed (npm install -g webgpu; set NUMBL_NO_WEBGPU to turn it off), and otherwise CPU devices that run the same code without a speedup. WebGPU computes in single precision only, so make GPU arrays from single data: gpuArray(single(X)). Element-wise operations, reductions, matrix products, indexing, sort and fft run on the GPU; other functions copy their arguments back to the host. Set NUMBL_GPU_LOG to see where that happens.