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
    • clc
    • diary
    • disp
    • display
    • format
    • input

clc — Clear the visible command window or console display in MATLAB and RunMat hosts.

clc clears visible console output by emitting a host clear-screen event. Terminal hosts typically translate this to ANSI clear behavior, while WASM hosts expose a clear stream event for embedding UIs.

Syntax

clc()

Returns

NameTypeDescription
ansNumericArrayEmpty matrix placeholder returned by sink invocation.

Errors

IdentifierWhenMessage
—One or more input arguments are passed to clc.clc: expected no input arguments

How clc works

  • clc accepts no input arguments.
  • The builtin does not print text itself. Instead it records a clear-screen control event in the execution stream.
  • Terminal hosts may translate that control event into an ANSI screen clear, while WASM hosts receive it as a stream entry with stream = 'clear'.
  • clc affects the visible console display only. It does not change workspace variables, figures, or execution state.
  • Passing any input arguments raises a MATLAB-style builtin error.

Does RunMat run clc on the GPU?

clc is a host-side control builtin. It emits a clear-screen event and does not perform numeric computation, array traversal, or GPU provider calls.

Examples

Clear the command window after printing a message

disp('hello');
clc;

Expected output:

% The host clears the visible console after displaying hello

Use clc between interactive steps

disp('Step 1 complete');
clc;
disp('Ready for the next command')

Expected output:

% Only the later output remains visible if the host honors clear-screen events

Calling clc with inputs is invalid

clc(1)

Expected output:

clc: expected no input arguments

Using clc with coding agents

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

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

FAQ

Does clc delete previous output permanently?⌄

It requests that the active host clear the visible console. Whether historical output remains available elsewhere depends on the host application.

What does WASM receive for clc?⌄

WASM hosts receive a stdout-like stream entry with stream = 'clear', which the embedding UI should interpret by wiping its rendered console output.

Does clc change variables or figures?⌄

No. clc only targets the visible console. Use clear for workspace variables and close all for figures.

Can I pass arguments to clc?⌄

No. The current implementation matches MATLAB's zero-input usage and raises an error when arguments are supplied.

Does GPU residency matter for clc?⌄

No. clc is purely a host-side control event and never interacts with GPU providers.

Related Io functions

Net

accept · read · readline · tcpclient · tcpserver · write

Repl Fs

addpath · cd · copyfile · delete · dir · exist · fileattrib · fileparts · fullfile · genpath · getenv · getpref · isenv · isfile · isfolder · ispref · ls · matlabroot · memmapfile · mkdir · movefile · open · opentoline · path · pathsep · pcode · pwd · readstruct · rehash · restoredefaultpath · rmdir · rmpath · run · savepath · setenv · setpref · system · tempdir · tempname · uigetdir · uigetfile · uiputfile · unsetenv · userpath · what · winqueryreg · xmlread · xmlwrite

Tabular

arrayDatastore · csvread · csvwrite · detectImportOptions · dlmread · dlmwrite · fileDatastore · parquetDatastore · parquetinfo · parquetread · readcell · readmatrix · readtable · readtimetable · spreadsheetImportOptions · writecell · writematrix · writetable · writetimetable · xlsread · xlswrite

Audio

audioinfo · audioread

Io

diary · disp · display · format · input

Filetext

fclose · feof · fgetl · fgets · fileread · filewrite · fopen · fprintf · fread · frewind · fwrite · readlines · writelines

Archive

gunzip · gzip · unzip

Hdf5

h5disp · h5info · h5read · h5write · h5writeatt · hdf5info · hdf5read · hdf5write

Import

importdata · textscan

Json

jsondecode · jsonencode

Mat

load · matfile · save

Http

sendmail · urldecode · urlencode · weboptions · webread · websave · webwrite

Open-source implementation

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

  • View the source for clc 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
  • Returns
  • Errors
  • How clc works
  • Does RunMat run clc on the GPU?
  • Examples
  • Clear the command window after printing a message
  • Use clc between interactive steps
  • Calling clc with inputs is invalid
  • Using clc with coding agents
  • FAQ
  • Related Io functions
  • Net
  • Repl Fs
  • Tabular
  • Audio
  • Io
  • Filetext
  • Archive
  • Hdf5
  • Import
  • Json
  • Mat
  • Http
  • Open-source implementation
  • About RunMat