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 ( |
Graphics Objects and Customization, Calling Python from MATLAB |
R2016b |
Implicit expansion; |
|
R2017a |
Double-quoted string literals |
|
R2019b |
|
|
R2020b |
|
|
R2021a |
The |
|
R2022b |
|
|
R2023a |
Build tasks with arguments; incremental builds |
|
R2023b |
|
|
R2024a |
Packages renamed namespaces; |
|
R2024b |
MATLAB Package Manager ( |
|
R2025a |
New web-based desktop (themes, panels, figures as tabs); plain-text live code; |
|
R2025b |
A quality and stability release |
- |
R2026a |
|
|
R2026b |
Java no longer installed; "toolbox" becomes "package"; File Exchange as a repository; |
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.
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, |
Graphics objects with dot notation ( |
R2014b |
|
|
Implicit expansion ( |
R2016b |
|
Character arrays only, |
|
R2016b, R2017a |
|
|
|
R2014b |
|
|
|
R2011a |
|
|
|
R2012a |
|
|
|
R2019b, R2021a |
|
No local functions in scripts |
Local functions at the end of a script, and anywhere in the file |
R2016b, R2024a |
|
Cell publishing, |
Live scripts; plain-text |
R2016a, R2025a, R2026b |
|
GUIDE (Davis §17.2) |
App Designer and programmatic |
R2025a |
|
M-Lint report and Java desktop windows (Davis ch. 2 and 11) |
The Code Analyzer and |
R2022b, R2025a |
|
The Help browser, |
|
R2024b, R2026a |
|
|
|
R2014b |
|
The old MEX API ( |
The C++ MEX API, or the interleaved-complex C API ( |
R2018a |
|
|
|
R2014b |
|
|
|
R2016a |
|
"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 |
|
|
|
R2022b |
|
"Package" meaning a |
Namespace since R2024a. "Package" now means a MATLAB Package Manager package (R2024b), including what was called a toolbox (R2026b) |
R2024a, R2024b, R2026b |
|
|
|
R2025a |
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 |
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 |
|
|
Removed; calling them errors |
R2026a |
|
|
No current reference page; removed long ago |
before R2026b |
|
|
Errors, to be removed in a future release |
R2026b |
|
|
Not recommended |
R2026a |
|
|
Not recommended |
R2026b |
|
Classes defined with function syntax (an |
Still runs; the release notes announce removal in a future release, and case-sensitive folder names will be required |
announced R2025a and R2026a |
|
|
Renamed "package file"; |
R2026b |
|
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.
-
Run the Code Compatibility Analyzer and the Code Analyzer (
codeIssues) and fix what they report as removed or erroring. -
Replace function-syntax classes, GUIDE apps and
serialobjects, the three items that are going away. -
Switch to the current text and date types where the code builds text or dates by hand:
string,contains,startsWith,datetime. -
Replace argument checking by hand with
argumentsblocks, and option parsing withName=Valuearguments. -
Drop
bsxfunandrepmatfor implicit expansion where the code only expands sizes; keep them where the code must also run on R2016a or earlier. -
Replace
+foldertalk with "namespace" in comments, and rename.mltbxtoolbox files in your own documentation to package files. -
Replace
containers.Mapwithdictionarywhere the data fits, remembering that a dictionary is a value, not a handle. -
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).