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
    • 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

opentoline — Open a file to a requested editor line in MATLAB-compatible code.

opentoline(filename,line) resolves a file and validates a host-safe editor-navigation request. RunMat runtimes are noninteractive, so successful calls complete without launching an editor.

Syntax

opentoline(filename, line)
opentoline(filename, line, column)
opentoline(filename, line, column, option)

Inputs

NameTypeRequiredDefaultDescription
filenameStringScalarYes—File to open in the editor.
lineNumericScalarYes—One-based line number.
columnNumericScalarNo1One-based column number.
optionStringScalarNo—Editor navigation option such as 'select'.

Errors

IdentifierWhenMessage
RunMat:opentoline:ArgumentCountThe call does not provide two to four input arguments.opentoline: expected filename, line, optional column, and optional option
RunMat:opentoline:InvalidFilenameThe filename is not a string scalar or row character vector.opentoline: filename must be a character vector or string scalar
RunMat:opentoline:InvalidPositionThe line or column argument is not a positive integer scalar.opentoline: line and column must be positive integer scalars
RunMat:opentoline:InvalidOptionThe optional editor behavior argument is unsupported.opentoline: option must be 'select' when provided
RunMat:opentoline:FileNotFoundNo file matching the supplied name can be resolved.opentoline: file was not found
RunMat:opentoline:TooManyOutputsThe call requests one or more output arguments.opentoline: expected no output arguments

How opentoline works

  • opentoline(filename,line) accepts a string scalar, row character vector, or scalar string array filename plus a positive integer line number.
  • opentoline(filename,line,column) also validates a positive integer column number.
  • Native typed-integer line and column spellings are RunMat extensions because the public contract establishes structural positions without enumerating native numeric classes.
  • Explicit gpuArray positions are a separate RunMat extension; automatically resident compatible scalars still gather through their owning provider in MATLAB-compatible mode.
  • opentoline(filename,line,column,'select') accepts MATLAB-style selection intent as a no-op navigation option in noninteractive hosts.
  • Command-style numeric line and column arguments passed as text, such as opentoline file.m 10 4, are accepted when they parse as positive integers.
  • File names are resolved using the RunMat search path and the same general MATLAB-style file extensions used by open.
  • A missing file raises RunMat:opentoline:FileNotFound.
  • Non-scalar, nonfinite, fractional, zero, or negative line and column values raise RunMat:opentoline:InvalidPosition.
  • Requesting output arguments raises RunMat:opentoline:TooManyOutputs.

Does RunMat run opentoline on the GPU?

opentoline is a host-side editor navigation operation and does not participate in GPU fusion or provider-native computation; an admitted automatically resident position is downloaded through its owning provider before validation.

Examples

Open a script at a line

opentoline('setup.m', 12)

Expected output:

% setup.m is resolved and the editor-navigation request succeeds without returned output.

Open a script at a line and column

opentoline('setup.m', 12, 4)

Expected output:

% RunMat validates the file, line, and column.

Use command-style text numbers

opentoline setup.m 12 4

Expected output:

% Text line and column arguments are parsed as positive integers.

Using opentoline with coding agents

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

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

FAQ

Does opentoline launch a desktop editor?⌄

No. RunMat's runtime implementation is host-safe and noninteractive. It resolves the file and validates the requested position; the actual editor navigation completes as a no-op.

Why is this builtin under io/repl_fs instead of plotting?⌄

opentoline is an editor/file navigation helper. It appeared in a plotting/UI token bucket, but its runtime ownership belongs with REPL-facing filesystem and editor-style operations.

Related Io functions

Repl Fs

addpath · cd · copyfile · delete · dir · exist · fileattrib · fileparts · fullfile · genpath · getenv · getpref · isenv · isfile · isfolder · ispref · ls · matlabroot · memmapfile · mkdir · movefile · open · 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

Net

accept · read · readline · tcpclient · tcpserver · write

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

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

  • View the source for opentoline 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
  • Errors
  • How opentoline works
  • Does RunMat run opentoline on the GPU?
  • Examples
  • Open a script at a line
  • Open a script at a line and column
  • Use command-style text numbers
  • Using opentoline with coding agents
  • FAQ
  • Related Io functions
  • Repl Fs
  • Net
  • Tabular
  • Audio
  • Io
  • Filetext
  • Archive
  • Hdf5
  • Import
  • Json
  • Mat
  • Http
  • Open-source implementation
  • About RunMat