What’s New and Migrating Older Code

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

The reference material consulted while preparing these pages is listed in the section bibliography.

Written against MATLAB R2026b and checked on 2026-10-22, when the release notes at mathworks.com/help/matlab/release-notes.html listed R2026b as the newest release and had no R2027a entry. If R2027a is out when you read this, treat the table below as complete up to R2026b only.

This page is the one place that collects what changed between the releases and how to migrate. Every other page of the section states the same facts for its own topic; here they are side by side, because most of the MATLAB material on the web, and the two reference books used as checklists for this section, was written for a release between R2006 and R2013 and teaches forms that have since been replaced. The books are described in How the books were used: the primer was written for R2010a and the mathematics volume for an old release whose listings were also corrupted in conversion.

How releases are numbered

MathWorks ships two releases a year, named after the year and a letter: an "a" release in spring (March to May) and a "b" release in September. R2026b was announced on 2026-09-28. Release notes are published for every release, and the current documentation carries a note such as "Introduced in R2019b" on the reference page of a function or feature. That note is the most reliable way to date a feature. When this page says "documented", a current R2026b page states the release; when it says "release notes", the entry comes from the release notes. Three rows come from secondary sources or from general knowledge and are marked as such, because the current documentation does not state them.

Compatibility works in two directions. Code written for an older release almost always still runs, because MathWorks removes functionality slowly: a function is first listed as "not recommended", often for many releases, then "to be removed", then removed. Code written with a newer feature does not run on an older release, so a .m file that uses an arguments block fails on R2018b. The reference pages show the status in the title, for example "(Not recommended)", "(To be removed)" or "(Removed)".

The version baseline

The table lists the base-MATLAB changes that matter to a learner of the language. The last column says where this section explains the feature. The same table, with a "Status" column that records how each row was checked, is in the section overview, under Version baseline.

Release What arrived Where explained

R2014b

Graphics objects with dot notation (h.LineWidth = 2); the histogram function (documented as introduced in R2014b); the py. interface to Python

Graphics Objects and Customization, Calling Python from MATLAB

R2016b

Implicit expansion; string arrays; local functions in scripts (at the end of the file); timetables

Implicit Expansion, Strings, Scripts, Timetables

R2017a

Double-quoted string literals

Strings and Character Arrays

R2019b

arguments blocks; the change to function precedence (an identifier used as a variable in a function cannot also be called as a function in that function)

Argument Validation, Function Precedence

R2020b

pattern objects

Regular Expressions and Patterns

R2021a

The Name=Value call syntax

Argument Validation

R2022b

dictionary; buildtool; codeIssues

Dictionaries, buildtool, Code Analyzer

R2023a

Build tasks with arguments; incremental builds

Build Automation with buildtool

R2023b

configureDictionary, insert, lookup, remove; readstruct and writestruct for JSON; the ode object; TestTask, CodeIssuesTask and CleanTask; codeIssues export to SARIF; piechart and donutchart; native Apple silicon

JSON, XML and Web Access, ODEs, buildtool

R2024a

Packages renamed namespaces; meta.* becomes matlab.metadata.*; local functions anywhere in a script; createArray; Live Editor export to Markdown and Jupyter

Namespaces, Scripts, Matrices and Arrays

R2024b

MATLAB Package Manager (mpm functions, mpackage.json); weak references; matlab.lang.obfuscateNames; readdictionary and writedictionary; build task groups; isapprox; violinplot; the Help browser removed (documentation opens in the system web browser)

Packages, Value and Handle Classes, Getting Help

R2025a

New web-based desktop (themes, panels, figures as tabs); plain-text live code; namelengthmax is 2048; cancel for onCleanup; GUIDE removed; plot tools removed; mustBeBetween and allbetween; custom build task classes; MATLAB Copilot (a separate product)

Desktop, App Designer, Live Scripts

R2025b

A quality and stability release

-

R2026a

metafunction; mustBeSorted, with mustBeInRange now not recommended in favour of mustBeBetween; namespaceFunctions and namespaceClasses; MATLAB Vault importSecrets; ode automatic-differentiation Jacobian; External Languages panel and pystringarray; Python 3.13; JSON as tables and timetables; raincloudplot; info, helpdesk, helpbrowser, support and whatsnew removed; parallel build tasks; announced removal of function-syntax classes

Argument Validation, Secrets, classdef Basics

R2026b

Java no longer installed; "toolbox" becomes "package"; File Exchange as a repository; matlab.toml; plain-text live scripts by default; markdowndisp; ANSI styling in the Command Window; Google Sheets I/O; numeric row times; buildtool -outputCache and -report, PackageTask; runtests UseParallel="auto"; object lifecycle management (beta); mustBeScalar and mustBeVectorOrEmpty; serial now errors (use serialport); Python 3.14 added, Python 3.9 no longer supported, Python installable from the Add-Ons panel, and Ctrl+C interrupts out-of-process Python

Projects, Calling Python, Live Scripts

Three rows deserve a caution, because the current documentation does not confirm them. The dot notation for graphics objects is attributed to R2014b by the issue’s checklist; the current documentation confirms the histogram function in R2014b but not the dot notation itself. Double-quoted string literals in R2017a rest on MathWorks Answers and a third-party release review (nhigham.com). Local functions in scripts are attributed to R2016b, but the current page only says that before R2024a they had to be defined at the end of the file. For those three, read "about this release" rather than "exactly this release".

A correction worth making explicit, because summaries get it wrong: Python 3.14 was added and Python 3.9 dropped in R2026b, not in R2026a. The R2026a release notes add Python 3.13; the R2026b notes add 3.14 and discontinue 3.9. The page Versions of Python Compatible with MATLAB Products by Release lists R2026a as 3.9 to 3.13 and R2026b as 3.10 to 3.14.

The release notes page has one section per release, from R2026b downwards, so it is the link for every row of R2024b and later; the archived per-release pages of older releases are rendered in the browser by scripts and were not usable as stable links, which is why the older rows cite the reference pages instead. Sources: MATLAB release notes, the same notes as Markdown, and the "Introduced in" notes on arguments, pattern and mustBeBetween.

A timeline of the releases

The same changes, as a picture. Each entry is a headline, not the whole list.

timeline title MATLAB language and tooling changes, R2014b to R2026b section The array and string era R2014b : graphics objects : histogram : py. interface R2016b : implicit expansion : string arrays : timetables R2017a : double-quoted strings section Functions and text R2019b : arguments blocks : function precedence change R2020b : pattern objects R2021a : Name=Value calls section Dictionaries and builds R2022b : dictionary : buildtool : codeIssues R2023b : readstruct and writestruct : ode object R2024a : namespaces : local functions anywhere section Packages and the new desktop R2024b : MATLAB Package Manager : Help browser removed R2025a : new desktop : GUIDE removed R2026a : metafunction : info and helpdesk removed R2026b : toolbox becomes package : Python 3.14 : Java not installed

Legacy to modern

Each row is a form that older material teaches and the form this section uses. "Still runs" means the old form works in R2026b; it does not mean it is recommended. The first column names the book chapters where the older form appears, because the books are the reason the table exists.

Older form (where it appears) Current form Since Page

Numeric graphics handles, set(gca,...) and get (Davis ch. 17, Pérez López ch. 4 §4.10)

Graphics objects with dot notation (ax.XLim = [0 1]). set and get still work

R2014b

Graphics Objects

bsxfun recommended over repmat (Davis §5.9)

Implicit expansion (A - v). bsxfun still works

R2016b

Implicit Expansion

Character arrays only, strmatch, findstr (Davis §3.7, Pérez López p. 45)

string arrays, double-quoted literals, startsWith, contains, strfind, pattern. strmatch and findstr are marked "Not recommended"

R2016b, R2017a

Strings

datenum, datestr

datetime, duration; datenum and datestr are not recommended

R2014b

Dates and Times

RandStream.getDefaultStream, rand('seed'), randn('seed') (Davis p. 23, Pérez López pp. 75-76)

rng

R2011a

Random Numbers

quad, quadl, dblquad (Davis pp. 131, 153)

integral, integral2. The quad page says "Not recommended"

R2012a

Integration and ODEs

nargchk, hand-written nargin tests, inputParser

narginchk, and arguments blocks with Name=Value calls

R2019b, R2021a

Argument Validation

No local functions in scripts

Local functions at the end of a script, and anywhere in the file

R2016b, R2024a

Scripts

Cell publishing, publish (Davis ch. 23)

Live scripts; plain-text .m live code is the default in R2026b. Classic publishing still exists

R2016a, R2025a, R2026b

Live Scripts

GUIDE (Davis §17.2)

App Designer and programmatic uifigure apps. GUIDE was removed in R2025a, although existing GUIDE apps still run

R2025a

App Designer

M-Lint report and Java desktop windows (Davis ch. 2 and 11)

The Code Analyzer and codeIssues; the new web-based desktop

R2022b, R2025a

Code Analyzer, Desktop

The Help browser, helpdesk, info, whatsnew

doc, which opens the system web browser; the Help Center

R2024b, R2026a

Getting Help

urlread, wavread

webread and audioread. urlread is marked "Not recommended"; wavread has no page in the current documentation

R2014b

JSON, XML and Web Access

The old MEX API (mxGetPr)

The C++ MEX API, or the interleaved-complex C API (mex -R2018a) with typed accessors

R2018a

C/C++ Libraries and MEX

hist, rose, polar (Pérez López pp. 110-119)

histogram, polarhistogram, polarplot. hist is marked "Not recommended"

R2014b

2-D Plotting

ezplot, ezsurf and fplot with string expressions

fplot and fsurf with function handles

R2016a

3-D Plotting

"MATLAB uses Maple for symbolic maths" (Pérez López p. 19)

False since R2008b: the symbolic engine is MuPAD, in the Symbolic Math Toolbox. Out of scope here

R2008b

Toolboxes

containers.Map as the key-value type (Davis ch. 8, "other data types")

dictionary; containers.Map is legacy but still works

R2022b

Dictionaries

"Package" meaning a +folder

Namespace since R2024a. "Package" now means a MATLAB Package Manager package (R2024b), including what was called a toolbox (R2026b)

R2024a, R2024b, R2026b

Namespaces, Packages

mustBeInRange

mustBeBetween (introduced in R2025a); mustBeInRange is not recommended from R2026a

R2025a

Argument Validation

In the "Since" column, the dates that also appear in the version-baseline table are checked as described there. The others (R2008b for the symbolic engine, R2011a for rng, R2012a for integral, R2014b for datetime, webread and audioread, R2016a for the live editor and fplot with function handles, R2018a for the interleaved-complex API) come from general knowledge of the release history and were not re-checked on the current pages. The point of these rows is the direction of travel, not the exact release.

Old and new forms that Octave also accepts can be compared directly. Octave 11.3.0 was used for this run, and its output layout differs slightly from MATLAB’s (MATLAB prints size headers such as 2×3):

A = [1 2 3; 4 5 6];
v = [10 20 30];
B1 = bsxfun(@minus, A, v)   % the pre-R2016b form
B2 = A - v                  % implicit expansion, R2016b and later
f = @(x) x.^2;
q  = quad(f, 0, 1)          % not recommended in MATLAB
q2 = integral(f, 0, 1)      % the current form

Octave 11.3.0 output:

B1 =

   -9  -18  -27
   -6  -15  -24

B2 =

   -9  -18  -27
   -6  -15  -24

q = 0.3333
q2 = 0.3333

The two forms agree. The rest of the table (string arrays, dictionary, datetime, arguments, rng details) is MATLAB behaviour that Octave 11.3.0 does not reproduce, so no output is shown for it; the GNU Octave Compatibility page records which of these names exist in Octave.

Removed and soon-to-be-removed functionality

The table lists what the section mentions as gone or going. "Errors" means the call fails; "Still runs" means it works but is marked for removal.

Item What happens now Release Use instead

GUIDE and the guide function

Removed; existing GUIDE apps still run, but cannot be edited in the drag-and-drop environment

R2025a

App Designer; the GUIDE to App Designer Migration Tool on File Exchange

Plot tools

Removed (release notes)

R2025a

See the R2025a release notes for the replacements

The Help browser

Removed; documentation opens in the system web browser

R2024b

doc, the Help Center

info, helpdesk, helpbrowser, support, whatsnew

Removed; calling them errors

R2026a

doc, the release notes page

wavread

No current reference page; removed long ago

before R2026b

audioread

serial and its object properties

Errors, to be removed in a future release

R2026b

serialport

mustBeInRange

Not recommended

R2026a

mustBeBetween

mustBeVector(value,"allow-all-empties")

Not recommended

R2026b

mustBeVectorOrEmpty

Classes defined with function syntax (an @ClassName folder and class(s,"ClassName"))

Still runs; the release notes announce removal in a future release, and case-sensitive folder names will be required

announced R2025a and R2026a

classdef

.mltbx called a "toolbox file"

Renamed "package file"; matlab.addons.install is not recommended

R2026b

mpminstall

The deprecation statuses come from the page titles on the current reference ("(Removed)", "(To be removed)", "(Not recommended)") and from the release notes. A function that is not recommended is not the same as removed: bsxfun, containers.Map, urlread, quad, hist and strmatch all still run. Prefer the replacement in new code, and use the Code Compatibility Analyzer (next section) to find the others in an existing code base.

The Code Compatibility Analyzer

Before moving code to a newer release, ask MATLAB what it thinks will break. The Code Compatibility Analyzer scans your files and lists, in tabular form, the compatibility issues it can detect, with an instruction for each. Its report groups the findings by what will happen: functionality that has been removed, functionality that has changed behaviour, unsupported or undocumented functionality that may cause errors, functionality that will be removed or will change behaviour in a later release, and new functionality that might improve the code. The recommended order is to fix the syntax errors first, because they stop the analysis from being reliable, then the removed functionality, then the rest.

codeCompatibilityReport                                  % current folder and its subfolders
codeCompatibilityReport("heatflow","IncludeSubfolders",true)
cca = analyzeCodeCompatibility("heatflow");              % keep the result as an object
codeCompatibilityReport(cca)                             % show a report for the stored object

These calls were not run here: R2026b is not installed on the machine that produced these pages, and Octave has no such function. The syntaxes codeCompatibilityReport(names), codeCompatibilityReport(___,'IncludeSubfolders',tf) and codeCompatibilityReport(cca) are those on the function’s reference page; analyzeCodeCompatibility and codeCompatibilityAnalyzer are named on the Analyzer’s topic page, which says that the Analyzer can also be opened from the Apps tab. The Code Analyzer itself, and codeIssues, are covered on Code Analyzer and Code Quality.

A migration checklist

When you modernise a script or a small library, work through the changes in this order. The order puts the mechanical, low-risk changes first.

  1. Run the Code Compatibility Analyzer and the Code Analyzer (codeIssues) and fix what they report as removed or erroring.

  2. Replace function-syntax classes, GUIDE apps and serial objects, the three items that are going away.

  3. Switch to the current text and date types where the code builds text or dates by hand: string, contains, startsWith, datetime.

  4. Replace argument checking by hand with arguments blocks, and option parsing with Name=Value arguments.

  5. Drop bsxfun and repmat for implicit expansion where the code only expands sizes; keep them where the code must also run on R2016a or earlier.

  6. Replace +folder talk with "namespace" in comments, and rename .mltbx toolbox files in your own documentation to package files.

  7. Replace containers.Map with dictionary where the data fits, remembering that a dictionary is a value, not a handle.

  8. Re-run the tests (see Unit Testing) after each step, so that a behaviour change is attributed to one edit.

Removed functions fail at the call, not when the file is loaded: a call to wavread in current MATLAB stops with "Unrecognized function or variable 'wavread'.", identifier MATLAB:UndefinedFunction, so only code paths that are actually run, or the Code Compatibility Analyzer, reveal them.

Step 5 is the main compatibility trap: code that uses implicit expansion does not run on R2016a or earlier, where [1 2 3] + [1; 2] stopped with "Matrix dimensions must agree." (identifier MATLAB:dimagree); current releases expand it to a 2-by-3 matrix and keep an error, "Arrays have incompatible sizes for this operation." (identifier MATLAB:sizeDimensionsMustMatch), for sizes that really do not match. If you maintain code that must support old releases, keep the older forms and say so in a comment.

Where older books differ

The table above is the collected answer. The shortest summary: the primer teaches the MATLAB of 2010, with a Java desktop, a Help browser, cell publishing, GUIDE and bsxfun; the 2021 mathematics volume keeps the 1990s habits of its source material (numeric graphics handles, hist, quad) and its listings were corrupted in conversion, so this section does not reproduce them. Everything those books teach about arrays, indexing, control flow, functions, classdef and the numerical functions remains correct. The things that changed are the surface: the desktop, the text and date types, argument checking, the graphics handle type, the names package and toolbox, and the tools around the language (the Code Analyzer, live scripts, buildtool, the package manager).