RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

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.

/
See all docs
Builtin Reference
    • addpath
    • cd
    • copyfile
    • delete
    • dir
    • exist
    • fileattrib
    • fileparts
    • filesep
    • fullfile
    • genpath
    • getenv
    • getpref
    • isenv
    • isfile
    • isfolder
    • ispref
    • ls
    • matlabroot
    • memmapfile
    • memmapfile.subsasgn
    • memmapfile.subsref
    • 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

uiputfile — Open a host save-file dialog and return the selected file name and path.

uiputfile requests a save-file target from the selected RunMat session host and returns MATLAB-compatible output values. Interactive hosts can implement the typed hook to show a native or browser save picker; noninteractive sessions return the standard cancellation values.

Syntax

file = uiputfile()
file = uiputfile(filter)
[file, path] = uiputfile(filter, title)
[file, path, index] = uiputfile(filter, title, defaultName)

Inputs

filter
Type
Any
Required
No
Default
"*.*"
Description
File extension pattern, semicolon-delimited patterns, or an N-by-1/N-by-2 cell array of patterns and descriptions.
title
Type
StringScalar
Required
No
Description
Dialog title.
defaultName
Type
StringScalar
Required
No
Description
Initial file or directory path for the dialog.
NameTypeRequiredDefaultDescription
filterAnyNo"*.*"File extension pattern, semicolon-delimited patterns, or an N-by-1/N-by-2 cell array of patterns and descriptions.
titleStringScalarNo—Dialog title.
defaultNameStringScalarNo—Initial file or directory path for the dialog.

Returns

file
Type
Any
Description
Selected filename, or 0 when cancelled.
path
Type
Any
Description
Directory containing the selected file, including a trailing separator, or 0 when cancelled.
index
Type
NumericScalar
Description
One-based selected filter index, or 0 when cancelled.
NameTypeDescription
fileAnySelected filename, or 0 when cancelled.
pathAnyDirectory containing the selected file, including a trailing separator, or 0 when cancelled.
indexNumericScalarOne-based selected filter index, or 0 when cancelled.

Errors

RunMat:uiputfile:InvalidArgument
When
A filter, title, or default path has an unsupported type or shape.
Message
uiputfile: invalid argument
RunMat:uiputfile:TooManyOutputs
When
More than three output arguments are requested.
Message
uiputfile: too many output arguments
RunMat:uiputfile:HostError
When
The active filesystem provider fails while opening the host save-file UI.
Message
uiputfile: file selection failed
RunMat:uiputfile:InvalidSelection
When
The active filesystem provider returns a malformed save-file selection.
Message
uiputfile: invalid file selection
IdentifierWhenMessage
RunMat:uiputfile:InvalidArgumentA filter, title, or default path has an unsupported type or shape.uiputfile: invalid argument
RunMat:uiputfile:TooManyOutputsMore than three output arguments are requested.uiputfile: too many output arguments
RunMat:uiputfile:HostErrorThe active filesystem provider fails while opening the host save-file UI.uiputfile: file selection failed
RunMat:uiputfile:InvalidSelectionThe active filesystem provider returns a malformed save-file selection.uiputfile: invalid file selection

Calling forms and results

file = uiputfile() uses an all-files filter.

uiputfile(filter) accepts a character vector, string scalar, semicolon-delimited pattern list, or an N-by-1/N-by-2 cell array of patterns and descriptions.

uiputfile(filter, title, defaultName) forwards the dialog title and initial file or directory path to the selected session host.

The selected path output is the containing directory with a trailing path separator. The index output is a one-based integer-valued double, not a native integer-class result.

Inputs are textual. Host or provider-resident numeric values are rejected before the save-file request is made.

Cancellation returns numeric zero for file, path, and index, matching MATLAB. This is also the behavior when the selected session host does not implement a save-file picker.

Host text and filter cells are validated before any dialog request. Genuine character or cell pages reject; trailing singleton dimensions retain their effective row/matrix shape. Numeric resident values are not text and do not trigger a gather.

Requesting more than three outputs rejects before opening the dialog. Requesting zero outputs still performs the host interaction and validates its result.

Host integration

No. Save-file dialogs are host/UI operations and always execute outside GPU residency. The provider hook returns a path in the active filesystem namespace, so browser hosts should map save targets into the mounted provider namespace before returning the path.

Host interaction is an effectful callback and fusion boundary, not GPU computation or a distributed worker task. Interactive examples use typed DesktopHost fixtures; headless cancellation does not verify an actual picker.

Examples

Choose a MAT-file destination

value = 42;
[file, path] = uiputfile('*.mat', 'Save workspace');
assert(strcmp(file, 'results.mat'));
save(fullfile(path, file), 'value');
assert(isfile(fullfile(path, file)));

Use multiple filters

filters = {'*.mat', 'MAT-files'; '*.txt', 'Text files'};
[file, path, index] = uiputfile(filters, 'Export data', 'results.mat');
assert(strcmp(file, 'report.txt'));
assert(index == 2);

Handle cancellation

[file, path, index] = uiputfile;
assert(isequal(file, 0)); assert(isequal(path, 0)); assert(isequal(index, 0));

Using uiputfile with coding agents

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

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

FAQ

What happens in noninteractive or headless RunMat hosts?⌄

The runtime returns numeric cancellation zeros when the selected session host has no picker. An interactive session host implements select_file_save.

How does a browser host provide a real save picker?⌄

The host must connect its interactive picker to the runtime's host-dialog service and return paths in the active filesystem namespace. Filesystem storage alone does not install a picker. Native host-dialog requests and selections are typed; browser applications need the corresponding host bridge.

Does uiputfile write the selected file?⌄

No. It only returns the selected file name and directory. Use fullfile(path, file) with save, fopen, writematrix, or another file-writing builtin to create the file.

Related Io functions

Repl Fs

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

Net

accept · read · readline · tcpclient · tcpserver · write

Tabular

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

Audio

audioinfo · audioread

Io

clc · diary · disp · display · format · input

Data

commit · data.copy · data.create · data.delete · data.exists · data.export · data.import · data.inspect · data.list · data.move · data.open · DataArray.chunk_shape · DataArray.codec · DataArray.dtype · DataArray.fill · DataArray.name · DataArray.rank · DataArray.read · DataArray.resize · DataArray.shape · DataArray.write · Dataset.array · Dataset.arrays · Dataset.attrs · Dataset.begin · Dataset.get_attr · Dataset.has_array · Dataset.id · Dataset.path · Dataset.refresh · Dataset.set_attr · Dataset.set_attrs · Dataset.snapshot · Dataset.version · DataTransaction.abort · DataTransaction.commit · DataTransaction.create_array · DataTransaction.delete_array · DataTransaction.fill · DataTransaction.id · DataTransaction.resize · DataTransaction.set_attr · DataTransaction.set_attrs · DataTransaction.status · DataTransaction.write

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 · matlab.io.MatFile.subsasgn · matlab.io.MatFile.subsref · save

Http

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

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/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
  • Calling forms and results
  • Host integration
  • Examples
  • Choose a MAT-file destination
  • Use multiple filters
  • Handle cancellation
  • Using uiputfile with coding agents
  • FAQ
  • Related Io functions
  • Repl Fs
  • Net
  • Tabular
  • Audio
  • Io
  • Data
  • Filetext
  • Archive
  • Hdf5
  • Import
  • Json
  • Mat
  • Http
  • About RunMat