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
    • colon
    • createArray
    • empty
    • eye
    • false
    • full
    • inf
    • linspace
    • logspace
    • magic
    • meshgrid
    • nan
    • nchoosek
    • ndgrid
    • nonzeros
    • ones
    • peaks
    • perms
    • rand
    • randi
    • randn
    • randperm
    • range
    • sparse
    • spdiags
    • speye
    • spones
    • sprand
    • true
    • zeros

full — Convert sparse matrix storage to full storage.

A = full(S) converts a sparse double, single, or logical matrix to dense full storage. Inputs that are already full numeric, logical, character, complex, or gpuArray values are returned unchanged. RunMat also supports exact sparse integer value storage behind the independently gated full-integer-sparse extension.

Syntax

A = full(S)

Inputs

NameTypeRequiredDefaultDescription
SAnyYes—Sparse or full matrix.

Returns

NameTypeDescription
AAnyFull matrix or already-full input.

Errors

IdentifierWhenMessage
RunMat:full:InvalidInputInput is not a sparse matrix or already-full matrix value.full: invalid input
RunMat:full:InternalSparse-to-full materialisation fails internally.full: internal error

How full works

  • full(S) converts sparse double, single, and logical values to dense values with the same class, row count, and column count.
  • Stored sparse values are materialized in column-major order and unstored entries become explicit zeros.
  • Every already-full integer class passes through exactly on the host, while already-full resident integer values retain the same owning-provider handle without ambient-provider dispatch.
  • In runmat compatibility mode, sparse matrices may carry any of the eight integer value classes and full densifies them without binary64 conversion; MATLAB-compatible modes reject this RunMat-only storage form before materialization.
  • Empty sparse matrices such as sparse(m,n) become dense m-by-n zero tensors.
  • Dense numeric tensors, scalar numeric/logical values, logical arrays, character arrays, complex arrays, and dense gpuArray handles pass through unchanged.
  • Cells, structs, strings, objects, function handles, symbolic expressions, classes, and exceptions raise RunMat:full:InvalidInput.

GPU memory and residency

Already-full GPU tensors remain on the GPU. Sparse host matrices are converted to host dense tensors.

Examples

Convert sparse storage to a full matrix

S = sparse([1; 3; 2], [1; 1; 2], [10; 30; 20], 3, 2);
A = full(S)

Expected output:

A = [10 0; 0 20; 30 0]

Empty sparse matrices become dense zeros

S = sparse(2, 3);
A = full(S)

Expected output:

A = [0 0 0; 0 0 0]

Already-full arrays remain full

A = full([1 0; 0 2])

Expected output:

A = [1 0; 0 2]

Using full with coding agents

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

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

FAQ

Does full change matrix values?⌄

No. It changes sparse storage into dense storage while preserving shape and values. Unstored sparse entries become explicit zeros.

Does full gather dense gpuArray values?⌄

No. Dense gpuArray handles are already full, so RunMat returns the existing GPU handle unchanged.

Does full preserve integer classes?⌄

Yes. Already-full integer arrays are identity operations for all eight integer classes. RunMat can also densify exact sparse integer storage in runmat compatibility mode; that sparse integer representation is an explicitly gated extension because MATLAB sparse value storage is double, single, or logical.

Can full create native sparse GPU output?⌄

No. RunMat's current sparse matrices are host-resident, and full only materializes them as host dense tensors.

Related Array functions

Creation

colon · createArray · empty · eye · false · inf · linspace · logspace · magic · meshgrid · nan · nchoosek · ndgrid · nonzeros · ones · peaks · perms · rand · randi · randn · randperm · range · sparse · spdiags · speye · spones · sprand · true · zeros

Grouping

accumarray · combinations · discretize · findgroups · groupcounts · grp2idx · splitapply

Sorting Sets

argsort · intersect · ismember · ismembertol · issorted · issortedrows · setdiff · setxor · sort · sortrows · union · unique

Shape

blkdiag · cat · circshift · diag · flip · fliplr · flipud · horzcat · ipermute · kron · permute · repelem · repmat · reshape · rot90 · squeeze · toeplitz · tril · triu · vertcat

Indexing

find · ind2sub · sub2ind

Introspection

iscolumn · isempty · ismatrix · isrow · isscalar · isvector · length · ndims · numel · size

Open-source implementation

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

  • View the source for full 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 full works
  • GPU memory and residency
  • Examples
  • Convert sparse storage to a full matrix
  • Empty sparse matrices become dense zeros
  • Already-full arrays remain full
  • Using full with coding agents
  • FAQ
  • Related Array functions
  • Creation
  • Grouping
  • Sorting Sets
  • Shape
  • Indexing
  • Introspection
  • Open-source implementation
  • About RunMat