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
    • addprop
    • assignin
    • class
    • clear
    • clearAllMemoizedCaches
    • clearCache
    • clearvars
    • dbclear
    • dbstack
    • dbstatus
    • dbtype
    • evalc
    • feval
    • findprop
    • getcallinfo
    • inputParser
    • isa
    • ischar
    • isdeployed
    • iskeyword
    • ismethod
    • isobject
    • isstring
    • isUnderlyingType
    • keyboard
    • matlab.metadata.DynamicProperty.delete
    • memoize
    • metaclass
    • mislocked
    • mlock
    • munlock
    • namelengthmax
    • narginchk
    • nargoutchk
    • notify
    • onCleanup
    • stats
    • str2func
    • superclasses
    • underlyingType
    • verLessThan
    • version
    • which
    • who
    • whos

iskeyword — Test MATLAB reserved keywords or list all keywords.

iskeyword(s) returns true when s is a MATLAB reserved keyword. iskeyword with no inputs returns a cell column containing the full keyword list as character vectors.

Syntax

tf = iskeyword(s)
k = iskeyword

Inputs

NameTypeRequiredDefaultDescription
sStringScalarYes—String scalar or character vector to test.

Returns

NameTypeDescription
tfLogicalArrayTrue when the text is a MATLAB keyword.
kAnyCell column of MATLAB keyword character vectors.

Errors

IdentifierWhenMessage
RunMat:iskeyword:InvalidArgumentMore than one input argument is supplied.iskeyword: expected zero or one input argument
RunMat:iskeyword:InvalidTextInput is not a string scalar or character vector.iskeyword: input must be a string scalar or character vector
RunMat:iskeyword:InternalRunMat cannot construct the keyword-list cell array.iskeyword: failed to build keyword list

How iskeyword works

  • Accepts a string scalar or character vector for the predicate form.
  • Rejects non-text inputs and nonscalar string arrays.
  • The keyword list is shared with isvarname, so reserved words such as for, end, classdef, and parfor cannot be valid variable names.
  • The result of iskeyword(s) is a host logical scalar. The result of iskeyword is a cell column of character row vectors.

Examples

Test a reserved keyword

tf = iskeyword('for')

Expected output:

tf = logical(1)

Test ordinary text

tf = iskeyword("plot")

Expected output:

tf = logical(0)

Return all keywords

k = iskeyword

Expected output:

k = {'break'; 'case'; ...; 'while'}

Using iskeyword with coding agents

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

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

FAQ

Does iskeyword accept string arrays?⌄

Only string scalars are accepted. Multi-element string arrays are rejected so the predicate remains a scalar MATLAB-compatible query.

Is the comparison case-sensitive?⌄

Yes. MATLAB keywords are lowercase language tokens, so iskeyword('for') is true while iskeyword('For') is false.

Related Introspection functions

addprop · assignin · class · clear · clearAllMemoizedCaches · clearCache · clearvars · dbclear · dbstack · dbstatus · dbtype · evalc · feval · findprop · getcallinfo · inputParser · isa · ischar · isdeployed · ismethod · isobject · isstring · isUnderlyingType · keyboard · matlab.metadata.DynamicProperty.delete · memoize · metaclass · mislocked · mlock · munlock · namelengthmax · narginchk · nargoutchk · notify · onCleanup · stats · str2func · superclasses · underlyingType · verLessThan · version · which · who · whos

Open-source implementation

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

  • View the source for iskeyword 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 iskeyword works
  • Examples
  • Test a reserved keyword
  • Test ordinary text
  • Return all keywords
  • Using iskeyword with coding agents
  • FAQ
  • Related Introspection functions
  • Open-source implementation
  • About RunMat