RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

RunMat™ is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

LicensePrivacy
/
See all docs
Builtin Reference
    • binocdf
    • boxplot
    • cdf
    • cdfplot
    • chi2cdf
    • corr
    • corrcoef
    • corrcov
    • cov
    • cov2corr
    • dummyvar
    • ecdf
    • filloutliers
    • fitdist
    • geomean
    • grpstats
    • harmmean
    • icdf
    • isoutlier
    • kstest
    • kurtosis
    • lsline
    • mad
    • mode
    • nanmax
    • normalize
    • normcdf
    • norminv
    • normpdf
    • onehotdecode
    • onehotencode
    • pdf
    • prctile
    • quantile
    • refline
    • rmse
    • skewness
    • tabulate
    • tcdf
    • tiedrank
    • tinv
    • tpdf
    • ttest2
    • wblinv

normalize — Normalize data by centering and scaling along a dimension.

normalize(A) returns z-scores of A along the first non-singleton dimension.

Syntax

N = normalize(A)
N = normalize(A, dim)
N = normalize(A, method)
N = normalize(A, dim, method)
N = normalize(A, method, methodtype)
N = normalize(A, dim, method, methodtype)
All supported normalize forms
N = normalize(A)
N = normalize(A, dim)
N = normalize(A, method)
N = normalize(A, dim, method)
N = normalize(A, method, methodtype)
N = normalize(A, dim, method, methodtype)
N = normalize(A, "center", centertype, "scale", scaletype)
N = normalize(A, dim, "center", centertype, "scale", scaletype)
[N, C, S] = normalize(___)

Inputs

NameTypeRequiredDefaultDescription
AAnyYes—Floating input data; native integer and logical data are gated RunMat extensions.
dimNumericArrayNo—Dimension to operate along.
methodStringScalarNo"zscore"Normalization method: zscore, norm, scale, range, center, or medianiqr.
methodtypeAnyNo—Method subtype or explicit center/scale/range parameter.
center_keywordStringScalarYes"center"Literal center method selector.
centertypeAnyYes—Centering mode or explicit center values.
scale_keywordStringScalarYes"scale"Literal scale method selector.
scaletypeAnyYes—Scaling mode or explicit scale values.

Returns

NameTypeDescription
NNumericArrayNormalized data.
CNumericArrayCentering values.
SNumericArrayScale values.

Returned values from normalize depend on how many outputs the caller requests.

Errors

IdentifierWhenMessage
RunMat:normalize:InvalidArgumentInputs, dimension, method, method type, or name-value options are malformed.normalize: invalid argument
RunMat:normalize:InternalInternal tensor conversion or allocation fails.normalize: internal error

How normalize works

  • MATLAB-compatible array data is single or double. Native integer and logical A values are independently gated RunMat extensions; complex floating arrays remain supported.
  • Single A produces single N, C, and S outputs. Double or admitted integer/logical A produces double outputs.
  • Every admitted integer data or numeric-parameter value must be exactly representable at the deliberate binary64 normalization boundary; wide values reject rather than round.
  • The optional dim argument chooses the operating dimension.
  • Default z-score normalization subtracts the mean and divides by sample standard deviation, omitting NaN values while preserving NaNs in the output.
  • Supports "zscore", "zscore","robust", "norm", "norm",p, "scale", "range", "center", and "medianiqr" methods.
  • Supports combined "center", centertype, "scale", scaletype forms, including explicit numeric center and scale arrays compatible by implicit expansion.
  • [N,C,S] = normalize(...) returns normalized values plus the center and scale parameters so they can be reused on another array.
  • Table and timetable DataVariables and ReplaceValues forms are tracked with the broader tabular workflow work.
  • When A is resident, requested numeric outputs are restored through A's exact owner only when that owner can preserve their class. An incompatible automatic owner may leave the correct-class result on host; incompatible explicit gpuArray intent errors. Resident controls do not select output residency.

Examples

Default z-score normalization

N = normalize([1; 2; 3])

Expected output:

N = [-1; 0; 1]

Normalize by Euclidean norm

N = normalize([3; 4], "norm")

Expected output:

N = [0.6; 0.8]

Using normalize with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how normalize changes the result.

Run a small normalize example, explain the result, then change one input and compare the output.

Related Stats functions

Summary

binocdf · boxplot · cdf · cdfplot · chi2cdf · corr · corrcoef · corrcov · cov · cov2corr · dummyvar · ecdf · filloutliers · fitdist · geomean · grpstats · harmmean · icdf · isoutlier · kstest · kurtosis · lsline · mad · mode · nanmax · normcdf · norminv · normpdf · onehotdecode · onehotencode · pdf · prctile · quantile · refline · rmse · skewness · tabulate · tcdf · tiedrank · tinv · tpdf · ttest2 · wblinv

Ml

bayesopt · classify · confusionmat · crossvalind · cvpartition · fitclinear · fitctree · fitlm · kmeans · knnsearch · lasso · lassoglm · linkage · lscov · mnrfit · optimizableVariable · pdist · pdist2 · perfcurve · predict · regress · ridge · squareform · test · training · tsne

Random

binornd · bootstrp · datasample · dividerand · exprnd · gamrnd · lhsdesign · mvnrnd · normrnd · random · randsample · rng · trnd · unidrnd · unifrnd · wblrnd

Hist

histc · histcounts · histcounts2

Options

statget · statset

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how normalize is executed, line by line, in Rust.

  • View the source for normalize in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • How normalize works
  • Examples
  • Default z-score normalization
  • Normalize by Euclidean norm
  • Using normalize with coding agents
  • Related Stats functions
  • Summary
  • Ml
  • Random
  • Hist
  • Options
  • Open-source implementation
  • About RunMat