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

icdf — Evaluate inverse cumulative distribution functions by distribution name or fitted distribution object.

icdf(name,p,...) evaluates inverse cumulative distribution functions for supported named distributions. icdf(pd,p) evaluates quantiles for a ProbabilityDistribution object returned by fitdist.

Syntax

x = icdf("Normal", p)
x = icdf("Normal", p, mu, sigma)
x = icdf("t", p, nu)
x = icdf("Weibull", p, a, b)
x = icdf("Chi-square", p, nu)
x = icdf("Binomial", p, n, prob)
All supported icdf forms
x = icdf("Normal", p)
x = icdf("Normal", p, mu, sigma)
x = icdf("t", p, nu)
x = icdf("Weibull", p, a, b)
x = icdf("Chi-square", p, nu)
x = icdf("Binomial", p, n, prob)
x = icdf("Gamma", p, shape, scale)
x = icdf("Exponential", p, mu)
x = icdf("Poisson", p, lambda)
x = icdf("Uniform", p)
x = icdf("Uniform", p, a, b)
x = icdf("Lognormal", p, mu, sigma)
x = icdf("Beta", p, a, b)
x = icdf("F", p, v1, v2)
x = icdf(pd, p)

Inputs

NameTypeRequiredDefaultDescription
nameStringScalarYes—Distribution name.
pAnyYes—Probability value.
muAnyNo0Mean parameter.
sigmaAnyNo1Standard deviation parameter.
nuAnyYes—Degrees of freedom parameter.
aAnyNo1Scale parameter.
bAnyNo1Shape parameter.
nAnyYes—Number of trials.
probAnyYes—Success probability parameter.
shapeAnyYes—Shape parameter.
scaleAnyYes—Scale parameter.
muAnyYes—Mean parameter.
lambdaAnyYes—Rate or mean parameter.
aAnyYes—Lower endpoint.
bAnyYes—Upper endpoint.
aAnyYes—First shape parameter.
bAnyYes—Second shape parameter.
v1AnyYes—Numerator degrees of freedom.
v2AnyYes—Denominator degrees of freedom.
pdAnyYes—ProbabilityDistribution object returned by fitdist.
pNumericArrayYes—Probability values.

Returns

NameTypeDescription
yNumericArrayDistribution function value.
yNumericArrayDistribution function values.

Errors

IdentifierWhenMessage
RunMat:icdf:InvalidArgumentInputs are nonnumeric, sizes are incompatible, or too many arguments are supplied.icdf: invalid argument
RunMat:icdf:InternalInternal tensor conversion or allocation fails.icdf: internal error

How icdf works

  • Supported distribution names include "Normal", "t", "Weibull", "Chi-square", "Binomial", "Gamma", "Exponential", "Poisson", "Uniform", "Lognormal", "Beta", and "F".
  • Common aliases are accepted after case-insensitive normalization and removal of punctuation or spaces, including "norm", "gaussian", "student t", "wbl", "chi2", "bino", "gam", "exp", "poiss", "unif", "logn", and "fdist".
  • icdf("Normal",p) uses mean 0 and standard deviation 1; icdf("Normal",p,mu,sigma) uses supplied normal parameters.
  • icdf("t",p,nu) returns Student's t quantiles for degrees of freedom nu.
  • icdf("Weibull",p) uses scale 1 and shape 1; icdf("Weibull",p,a,b) uses supplied Weibull scale and shape.
  • icdf("Chi-square",p,nu) inverts the chi-square CDF with degrees of freedom nu.
  • icdf("Binomial",p,n,prob) returns the smallest integer outcome whose binomial CDF is at least p.
  • icdf("Gamma",p,shape,scale), icdf("Exponential",p,mu), icdf("Poisson",p,lambda), icdf("Beta",p,a,b), and icdf("F",p,v1,v2) require the shown distribution parameters.
  • icdf("Uniform",p) uses bounds [0,1]; icdf("Uniform",p,a,b) uses supplied lower and upper bounds.
  • icdf("Lognormal",p) uses mean 0 and standard deviation 1 for the underlying normal distribution; icdf("Lognormal",p,mu) and icdf("Lognormal",p,mu,sigma) use supplied lognormal parameters.
  • icdf(pd,p) supports fitted normal, exponential, lognormal, gamma, Weibull, and Poisson distribution objects returned by fitdist.
  • Scalar and compatible array inputs broadcast to a common output shape. Invalid probabilities or distribution parameters produce NaN elements.
  • Continuous distributions return endpoint values at p = 0 and Inf where the upper tail is unbounded at p = 1; bounded distributions return their finite endpoints. The Poisson inverse returns Inf at p = 1.

Examples

Normal median with parameters

x = icdf("Normal", 0.5, 10, 2)

Expected output:

x = 10

Discrete binomial quantile

k = icdf("Binomial", 0.75, 10, 0.5)

Expected output:

k = 6

Uniform quantile with bounds

x = icdf("Uniform", 0.25, 10, 20)

Expected output:

x = 12.5

Fitted distribution median

pd = fitdist([1;2;3], "Normal"); x = icdf(pd, 0.5)

Expected output:

x = 2

Using icdf with coding agents

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

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

FAQ

How is icdf related to distribution-specific inverse functions?⌄

icdf("Normal",p,mu,sigma) dispatches to the same numerical path as norminv(p,mu,sigma), icdf("t",p,nu) to tinv, and icdf("Weibull",p,a,b) to wblinv. Other supported distribution names use matching runtime CDF or inverse helper implementations.

Related Stats functions

Summary

binocdf · boxplot · cdf · cdfplot · chi2cdf · corr · corrcoef · corrcov · cov · cov2corr · dummyvar · ecdf · filloutliers · fitdist · geomean · grpstats · harmmean · 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

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 icdf is executed, line by line, in Rust.

  • View the source for icdf 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 icdf works
  • Examples
  • Normal median with parameters
  • Discrete binomial quantile
  • Uniform quantile with bounds
  • Fitted distribution median
  • Using icdf with coding agents
  • FAQ
  • Related Stats functions
  • Summary
  • Ml
  • Random
  • Hist
  • Options
  • Open-source implementation
  • About RunMat