Documentation

MATLAB Release Notes

R2015b

New Features, Bug Fixes, Compatibility Considerations

Desktop

Add-On Explorer: Add capabilities to MATLAB, including community-authored and MathWorks toolboxes, apps, functions, models, and hardware support

Add-ons extend the capabilities of MATLAB® by providing additional functionality for specific tasks and applications, such as connecting to hardware devices, additional algorithms, and interactive apps. Add-ons encompass a wide variety of resources, including products, apps, support packages and toolboxes, and are available from MathWorks® and from the global MATLAB user community.

Using the new Add-On Explorer, you can browse and install available add-ons directly from MATLAB.

  • To access the Add-On Explorer in MATLAB, go to the Home tab and click the Add-Ons icon.

  • To manage installed add-ons, go to the Home tab, and select Add-Ons > Manage Add-Ons.

For more information, see the Add-Ons documentation.

Compatibility Considerations

To continue using your apps and custom toolboxes from previous MATLAB installations, you must migrate them to the current release:

  1. On the Home tab, select Add-Ons > Manage Add-Ons.

  2. Click the Import button.

Documentation: Find information faster with redesigned Help navigation and browser-style keyboard shortcuts

Improved Navigation

The 2015b release includes a redesigned left-side navigation pane to facilitate topic exploration. From this pane you can:

  • View the current product, as well as adjacent categories relevant to your current area of focus.

  • Access basic product links such as getting started information, examples, functions and other references, release notes, and PDF documentation. Click the icon to the right of the product name to bring up available options.

  • Explore and navigate faster through subsections of a page. Click a subsection title to access its content. For example, suppose you want to view all the input arguments for the imshow function. Open the function reference page and in the left-side navigation pane, click Input Arguments.

Additional Introductory Material

Product pages and their primary categories now contain enhanced introductory material. New features include product and category overviews, images, quick links, and featured examples.

New Search Bar Location

A redesigned search bar is more visible on every page throughout the documentation.  You now can easily find and use the search tool whenever you need it.

New browser-style keyboard shortcuts

New keyboard shortcuts allow better navigation of the MathWorks documentation.

ActionKeyboard Shortcut
Open a new browser tab.Ctrl + T
Open a new browser window.Ctrl + N
Go to the Help browser home.Alt + Home
Reopen the last closed Help browser.Ctrl + Shift + T
Increase or decrease the font size of the Help browser.Ctrl + Mouse Scroll
Open a link in a new tab.Ctrl + Mouse Click or Mouse Center Click

Persistent Font Size

Font size now persists over multiple MATLAB Help browser and MATLAB Web browser sessions. To adjust the font size, use the Ctrl + Mouse Scroll keyboard shortcut.

Tab Completion: Complete commands with corrected capitalization

MATLAB now ensures command completions have the correct capitalization. For example, if you type help Contain and press Tab, MATLAB displays help containers in the command line.

Command Suggestions: Get suggested corrections for mistyped function names when calling help command

When calling the help command, you receive suggested corrections for mistyped function names. Press Enter to accept the suggestion or Esc to cancel.

Desktop layout: See sharper elements in the MATLAB desktop on high-DPI systems

The appearance of the MATLAB desktop is improved for these system configurations:

  • Macintosh systems with Apple Retina displays.

  • Windows® systems in which the DPI (dots-per-inch) value is higher than 96.

The MATLAB Desktop is now properly scaled and sharper on these systems than in previous releases. Be aware that the icons in the Toolstrip might still look slightly blurry on some systems.

For more information about the DPI-aware changes to MATLAB, see DPI-Aware Behavior in MATLAB.

Compatibility Considerations

  • The Toolstrip, Command Window fonts, and Editor fonts might be larger than in previous releases. These differences might occur on Windows systems in which the display DPI value is higher than 96. If you have nondefault font sizes selected in MATLAB preferences, you might need to adjust those font sizes to make them look smaller.

  • When publishing a document on a high-DPI system, the images saved to disk are larger than in previous releases or on other systems.

Language and Programming

findgroups and splitapply Functions: Split data into groups and apply functions to each group of data

The findgroups function finds groups within grouping variables. Use these groups and splitapply to split data out of data variables and apply functions to each group of data.

NaT Function: Create array of Not-a-Time values

The NaT function creates an array of Not-a-Time (NaT) values to represent unknown or missing datetime values.

timezones Function: Display list of time zone names

The timezones function displays a list of IANA time zone names that you can use as inputs to the datetime function.

timeofday Function: Calculate duration on days of Daylight Saving Time (DST) shift

The timeofday function accounts for the Daylight Saving Time (DST) shift on days when the shift occurs in time zones that observe DST.

Compatibility Considerations

Before MATLAB release R2015b, the timeofday function ignored the Daylight Saving Time (DST) shift on days when the shift occurs.

help Command: Specify a variable as input to the help command instead of specifying the variable class name

You can get help using a variable by specifying it as an input to the help command. For example if you have a variable t = datetime, calling the command help t displays help text for the datetime class.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations
clearStill runsDepends on usage

The clear function no longer clears debugging breakpoints. To clear breakpoints, use dbclear all.

The clear function only clears functions that are not currently running. For example, when you call clear myFun while myFun is running, myFun is not cleared.

Calling clear all, clear classes, and clear functions decreases code performance. For more information and alternatives, see clear.

Assign to a nonstructure variable as if it were a structure

Errors

Assign to a field of a new variable, or use the struct function.

If a variable exists and is not a structure, and you assign a field as if the variable were a structure, MATLAB throws an error. For example,

a = 1;
a.b = 2;
returns an error in MATLAB 8.6 and later.

Replace such an assignment with an assignment to a new variable, or use struct to assign a structure to the existing variable:

a = 1;
c.b = 2;
a = struct('b',2)

Invoke anonymous functions with implicit variables in the function body or argument list or implicit calls to nested functions

Errors

Use only explicit variables when constructing anonymous functions.

Implicit variables and function calls are often encountered in the functions such as eval, evalin, assignin, and load.  Avoid using these functions when you construct anonymous functions.

If an anonymous function accesses any variable or nested function that is not explicitly referenced in the argument list or body, MATLAB throws an error when you invoke the function.  For example,

f = @() eval(‘x');
implicitly references x and returns an error in MATLAB 8.6 and later.

If an anonymous function references implicit variables or nested functions and is saved in an earlier version of MATLAB, it returns an error in MATLAB 8.6 and later. 

Call .p files generated prior to MATLAB 7.5 (R2007b)

Errors

None

Rebuild any P-code files generated with MATLAB 7.4 or earlier using a more recent version of MATLAB.

depdir

Errors

matlab.codetools.requiredFilesAndProducts

Replace all instances of depdir with matlab.codetools.requiredFilesAndProducts. However, matlab.codetools.requiredFilesAndProducts returns the full path of a required file, including the file name.

depfun

Errors

matlab.codetools.requiredFilesAndProducts

Replace all instances of depfun with matlab.codetools.requiredFilesAndProducts. However, matlab.codetools.requiredFilesAndProducts does not identify opaque classes, such as Java® or COM classes. There is no replacement for this functionality.

Advanced Software Development

MATLAB Interface to Python: Clear Python class definitions with clear classes command, useful when reloading revised Python classes

You can modify a Python® module that is already loaded into MATLAB, using the MATLAB clear function and the Python importlib.import_module and reload functions. For an example, see Reload Modified User-Defined Python Module.

MATLAB Interface to Python: Pass a handle to a Python function to other Python functions called from MATLAB

To pass a Python function to a Python function, use the function handle @ symbol. For an example, see Pass Python Function to Python map Function.

MATLAB Interface to Python: Display error class name in error message

MATLAB displays the class name of a Python error, which provides more information about the error. See Troubleshooting Error Messages.

MATLAB Engine for Python: Call MATLAB functions and objects from Python by connecting to a running session of MATLAB

You can connect the MATLAB Engine for Python to a MATLAB session that is already running. For an example, see Connect Python to Running MATLAB Session.

MEX Compiler Support: Compile MEX files with freely available MinGW-w64 compiler on 64-bit Windows​

You can use the MinGW-w64 version 4.9.2 compiler from TDM-GCC to build MEX files and standalone MATLAB engine and MAT-file applications. For more information, see Install MinGW-w64 Compiler.

For an up-to-date list of supported compilers, see the Supported and Compatible Compilers website.

MEX Compiler Support: Compile MEX files with Microsoft Visual Studio Professional 2015

MATLAB R2015b supports Microsoft® Visual Studio® Professional 2015 for building MEX files and MATLAB engine applications.

MEX Compiler Support: Compile MEX files with Intel Fortran Composer XE 2013

MATLAB R2015b supports the Intel® Fortran Composer XE 2013 compiler with Microsoft Visual Studio 2013 Professional (64-bit) for building MEX files and MATLAB engine applications.

MEX Compiler Support: Discontinued for GNU gfortran

MATLAB no longer supports the GNU® gfortran compiler for building MEX files and MATLAB engine applications on Apple Mac platforms.

MEX Compiler Support: To be phased out for Microsoft Visual Studio 2008 SP1 and Apple Xcode 5.1

Support for these compilers will be discontinued in a future release, at which time new versions will be supported.

  • Microsoft Visual Studio 2008 SP1 and Microsoft Platform SDK version 6.1

  • Apple Xcode 5.1

For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

MEX: Display stack trace in warning message

MATLAB now displays the warning stack when a MEX file displays a warning. You can control the information displayed or suppressed by calling the warning function with the backtrace mode option before calling the MEX file.

Unit Testing Framework: Improve continuous integration workflows with diagnostics from the TAP plugin and a JUnit-style XML​ plugin

As of R2015b, the TAPPlugin includes diagnostic information in the Test Anything Protocol (TAP) stream. For more information, see matlab.unittest.plugins.TAPPlugin.

You can add the XMLPlugin to the test runner to produce a JUnit-style XML file. Use the output file to integrate test results with continuous integration systems like Jenkins™ or TeamCity®. For more information, see matlab.unittest.plugins.XMLPlugin.

Unit Testing Framework: Customize the test runner with plugins that immediately report finalized results and perform system-wide qualifications​

Write plugins that immediately report when the test runner finalizes a test result. A test result is final when no remaining test content can modify the results. Examples of when the test runner might modify previously run test results include when it executes code inside of TestClassTeardown methods, or when it tears down shared test fixtures. For more information, see the reportFinalizedResult method of TestRunnerPlugin and Plugin to Generate Custom Test Output Format.

Write plugins that perform system-wide qualifications of a test suite with the QualifyingPlugin interface. For more information, see matlab.unittest.plugins.QualifyingPlugin.

Unit Testing Framework: Run tests in parallel when available using the runtests​ function with the UseParallel option

Run a suite of tests in parallel using the runtests function and the Parallel Computing Toolbox™. For more information, see the 'UseParallel' name-value pair argument of runtests.

Unit Testing Framework: Detect and prevent warnings issued by tests using the new FailOnWarningsPlugin

Add the FailOnWarningsPlugin plugin to the test runner to produce a qualification failure when a test issues a warning. For more information, see matlab.unittest.plugins.FailOnWarningsPlugin.

Unit Testing Framework: Create interactive TestCase for specified class

You can create a test case to use and debug your test class interactively using the TestCase.forInteractiveUse method. This method accepts a meta.class instance that describes a TestCase subclass. For more information, see matlab.unittest.TestCase.forInteractiveUse.

Compatibility Considerations

You should no longer call the constructor of a TestCase subclass to use the instance interactively. Instead, pass the meta.class instance into the forInteractiveUse method. For example, instead of creating a test case using the constructor of MyTestCase:

tc = MyTestCase;

create a test case using the forInteractiveUse method:

tc = matlab.unittest.TestCase.forInteractiveUse(?MyTestCase);

Unit Testing Framework: Specify subfolders and subpackages for the CodeCoveragePlugin

Create a CodeCoveragePlugin that reports on source code contained within subfolders of the specified folders and subpackages of the specified packages. For more information, see matlab.unittest.plugins.CodeCoveragePlugin.

Unit Testing Framework: Specify test element name for runtests

You can use the runtests function to specify the name of a test suite element. For example, runtests('ATestFile/aTest'). The runtests function combines test suite element names with test files, test classes, packages, or folders to build and run your test suite. For more information, see runtests.

Unit Testing Framework: Validate exact list of causes using Throws constraint

As of R2015b, you can use the 'RespectingSet' name-value pair argument in the Throws constraint to validate that the invocation of a function handle throws an exception with only a specified list of expected causes. The 'RespectingSet' name-value pair argument has a default value of false. To create a Throws constraint that is not satisfied if the expected exceptions contain causes that are not specified in the 'CausedBy' name-value pair, set 'RespectingSet' to true. For more information, see matlab.unittest.constraints.Throws.

Calling Methods Behavior Change: Methods must be on the MATLAB path when called

Methods must be on the MATLAB path when called. For example, if you create an object and then change your current folder to a folder from which the method file is not visible, MATLAB returns an error when you call that method.

Compatibility Considerations

Before MATLAB release R2015b, after you create an object, you could call a method of that object even if the method definition was no longer on the MATLAB path. With release R2015b, methods must be on the MATLAB path when called.

numArgumentsFromSubscript Function: Return number of arguments for customized indexing methods

If your class overloads numArgumentsFromSubscript, MATLAB calls this method instead of numel to determine the number of array elements involved in an indexing operation when the number of elements is greater than one.

If your class overloads numel, MATLAB still calls your overloaded numel method.

subsref and subsasgn Functions: Compute number of arguments correctly

Before MATLAB release R2015b, MATLAB incorrectly computed the number of arguments expected for outputs from subsref and inputs to subsasgn for some indexing expressions that return or assign to a comma-separated list.

Compatibility Considerations

With release R2015b, MATLAB correctly computes the values of nargout and nargin according to the number of arguments required by the indexing expression. For more information, see Modify nargout and nargin for Indexing Methods.

subsasgn Function: Call only with output argument

The subsasgn function no longer supports a no output argument syntax that modifies the input argument.

Compatibility Considerations

Before MATLAB release R2015b, subsasgn modified the input argument when you did not specify an output argument. With release R2015b, you must assign an output argument or MATLAB returns an error:

Error using subsasgn
SUBSASGN must be called with an output.

display Function: Use new argument to display name

The display function supports a second input argument Use this argument to specify the character array to display instead of the variable name.

Java: Use javaArray function to create zero length arrays

MATLAB supports passing 0-length Java arrays to Java functions. To create such an array, use the javaArray function.

Compatibility Considerations

Before MATLAB release R2015b, MATLAB converted 0-length Java arrays to null.

Java: Preserve variables and functions in memory when using javaaddpath and javarmpath

The javaaddpath and javarmpath functions clear the definitions of all Java classes defined by files on the dynamic class path. As of MATLAB release R2015a, the functions do not use the clear java command, which also deletes global variables and variables from the MATLAB base workspace, and removes all compiled scripts, functions, and MEX functions from memory.

.NET: Convert some .NET types in System.Object[,] arrays to MATLAB types using the cell function

Use this cell function syntax to convert System.DateTime and System.String data to cell arrays of MATLAB data,

A = cell(obj,'ConvertTypes',type)

where obj is a .NET System.Object[,] array, and type is one of the following strings:

  • {'System.DateTime'} — Convert System.DateTime elements to MATLAB datetime elements.

  • {'System.String'} — Convert System.String elements to MATLAB strings.

  • {'all'} — Convert all supported .NET types to equivalent MATLAB types.

A is a cell array, that is the same size as the obj array.

Source Control Integration: Compare any pair of file revisions

In a file under source control in MATLAB, you can select any pair of file revisions to compare. Also, you can sort revisions by column headers in the Compare to Revision dialog box (for example, by date, revision number, or author). The Compare to Revision dialog box has an improved layout that places revision columns above the details pane, making it much easier to read.

Previously you could compare a revision only with your local file, which made investigation of older changes more difficult. You could not compare between other revisions, and you could not sort revisions.

Profile: Measure time with different wall-clock types

There are two additional wall-clock options for measuring time while profiling your code. The 'performance' timer uses the wall-clock time from the clock that the operating system uses to measure performance. As of R2015b, this option is the default timer for profiling. The 'processor' timer uses the wall-clock time directly from the processor. For more information, type help profile at the command prompt.

Compatibility Considerations

As of R2015b, the default timer is 'performance'. In previous versions of MATLAB, the default profiler timer was 'cpu', which measures compute time instead of wall-clock time. You may notice differences in the reported times from previous versions of MATLAB. Also, depending on the code you are profiling, the summary of results can appear different.

system, dos, and ! commands: Run Windows commands without running automatic Microsoft environment commands

On Windows platforms, the MATLAB system, dos, and ! commands add the /D flag to the startup of the Windows Command Processor (cmd.exe) program. The /D flag disables the running of these AutoRun strings in Windows registry:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor

  • HKEY_CURRENT_USER\Software\Microsoft\Command Processor

Compatibility Considerations

To preserve the behavior of previous releases, prepend cmd /C to your operating system command. For example, in MATLAB, the command,

!cmd /C "cd"

calls the cd command using the AutoRun values.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations

matlab.unittest.TestCase constructor

Errors

matlab.unittest.TestCase.forInteractiveUse

Replace all instances of creating a TestCase object using the default constructor.

Use the TestCase.forInteractiveUse static method for interactive, command-line use.

When you run tests in the unit testing framework, the test runner creates the instances.

matlab.lang.ObjectUpdateFailure

Errors

No replacement required

If changes to a class definition result in an incompatibility that MATLAB cannot resolve with existing objects of that class, MATLAB returns an error.

In previous releases, MATLAB converted those objects to object of the matlab.lang.ObjectUpdateFailure class. For more information, see Automatic Updates for Modified Classes.

Built-in support for the Microsoft Source Code Control Interface, including
cmopts
verctrl

Warns

None

MATLAB no longer includes built-in support for the Microsoft Source Code Control Interface (MSSCCI). Replace this functionality with one of these options:

checkin
checkout
customverctrl
undocheckout

Warns

None

Replace this functionality with one of these:

actxserver('progid','interface','IUnknown')

Still runs

None

R2015b is the last release supporting custom COM interfaces (IUnknown).

Mathematics

graph and digraph Classes: Create, analyze, and visualize graphs and networks

The graph and digraph functions enable creation of undirected and directed graphs.

After creating a graph object, there are numerous functions available for modifying the graph, analyzing its properties, applying search algorithms, and visualizing the structure. For more information, see Graph and Network Algorithms.

histcounts2 Function: Bin bivariate data

The histcounts2 function sorts bivariate data into 2-D bins with data dependent bin picking and options for bin control and normalization.

deg2rad and rad2deg Functions: Convert between radians and degrees

The deg2rad function converts angles from degrees to radians. The rad2deg function converts angles from radians to degrees.

datetime Arrays: Interpolate dates and times using interp1 function

The interp1 function accepts datetime arrays as an input argument.

duration Arrays: Perform computations on durations using interp1, eps, cummax, cummin, cumsum, mod, and rem functions

The interp1, eps, cummax, cummin, cumsum, mod, and rem functions accept duration arrays as an input argument.

expm, logm, and sqrtm Functions: Algorithm upgrades

The algorithms for expm, logm, and sqrtm show increased accuracy, with logm and sqrtm additionally showing improved performance.

histcounts Function: Use categorical array inputs

The histcounts function accepts categorical arrays as an input argument.

Data Import and Export

Excel Spreadsheets: Read and write to the same spreadsheet repeatedly with improved performance of xlsread, xlswrite, readtable, and writetable functions

Repeated calls to the xlsread, xlswrite, readtable, and writetable functions show significant performance improvement.

datastore Function: Import data from image collections that are too large to fit in memory as an ImageDatastore

Use the datastore function to create an ImageDatastore, which can import data from image collections that are too large to fit in memory.

ImageDatastore is a compatible datastore for use with mapreduce.

datastore Function: Import data from text files with support for additional character encoding schemes with TabularTextDatastore​

In addition to UTF-8 and US-ASCII, TabularTextDatastore now supports all of the character encoding schemes that the fopen function supports, such as, ISO-8859-1, windows-1251, and Shift_JIS. For additional supported encoding schemes, see TabularTextDatastore Properties.

Datastore: Specify and return file paths using Files property

Now when modifying the Files property of an existing datastore, each string in the input cell array of strings must contain a full path to the file. Previously, the input cell array could contain folder names or strings with wildcard (*) characters to represent multiple files.

The Files property for all file-based datastores is now a column vector. Previously, the Files property was a row vector.

Compatibility Considerations

Although modifying the Files property of an existing datastore requires full paths to the files, this change does not affect the creation of a datastore using the datastore function. When creating a new datastore using the datastore function, you can specify the location of the files or folders as a single string or a cell array of strings in the form of a column or row vector. The strings also can contain wildcard characters to represent multiple files.

VideoReader Object: Read streams of data more quickly from video files on Mac

VideoReader now reads MPEG-4 and MOV video files more quickly on Mac OS.

readtable and writetable Functions: Specify locale for dates in tables

You can specify the locale that the readtable and writetable functions use for month and day names. Specify the DateLocale name-value pair argument to read month and day names from text files, or to write month and day names to text files or spreadsheets.

Scientific File Format Libraries: Upgrades

LibraryVersion
NetCDF

4.3.3.1 (upgraded from 4.1.3)

NetCDF Library: Enhancements Due to Upgrade

The upgrade to the NetCDF library version 4.3.3.1 brings these enhancements:

  • Many bug fixes in the library

  • Fixes for older OPeNDAP servers that do not conform to DAP 2.0 protocol

Low-level reading and writing: Access to additional encoding schemes

The fopen function now supports additional character encoding schemes, including EUC-KR, GB2312, GB18030, and KOI8-R. After you call fopen, subsequent read and write operations such as fscanf, fprintf, fread, and fwrite use the specified character encoding.

webread, websave, and webwrite Functions: Use datetime objects as query parameters

The webread, websave, and webwrite functions can accept input arguments specified as datetime objects for requests to web services that accept dates and times as query parameters. To match the date and time format required by the web service you call, specify the Format property of a datetime object.

webread, websave, and webwrite Functions: Specify array format for query parameters that represent multiple values

To specify the array format for query parameters that represent multiple values, specify the ArrayFormat property of a weboptions object. Pass the query parameters and the weboptions object as input arguments to the webread, websave, or webwrite functions.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations

aufinfo

Errors

audioinfo

Replace all instances of aufinfo with audioinfo.

auread

Errors

audioread

Replace all instances of auread with audioread.

auwrite

Errorsaudiowrite

Write audio files using audiowrite.

wavfinfo

Errors

audioinfo

Replace all instances of wavfinfo with audioinfo.

wavread

Errors

audioread

Replace all instances of wavread with audioread.

wavwrite

Errors

audiowrite

Replace all instances of wavwrite with audiowrite.

movie2avi

WarnsVideoWriterRemove all instances of movie2avi. Write to AVI files with VideoWriter.

datastore(location,'DatastoreType',Value)

Still runs

datastore(location,'Type',Value)

Use name-value name 'Type' instead of 'DatastoreType'.

KeyValueLimit property of KeyValueDatastore class

Warns

ReadSize property of KeyValueDatastore class

Replace all instances of KeyValueLimit with ReadSize.

RowsPerRead property of TabularTextDatastore class

Warns

ReadSize property of TabularTextDatastore class

Replace all instances of RowsPerRead with ReadSize.

Folders and wildcard (*) characters in Files property of KeyValueDatastore and TabularTextDatastore

Warns

A string or cell array of strings where each string represents a full path to the file

Replace all folder names or wildcard characters with full path and file names when assigning to the Files property.

hdfgdWarnsmatlab.io.hdfeos.gdReplace all instances of hdfgd with the corresponding function in the matlab.io.hdfeos.gd package.
hdfsdWarnsmatlab.io.hdf4.sdReplace all instances of hdfsd with the corresponding function in the matlab.io.hdf4.sd package.
hdfswWarnsmatlab.io.hdfeos.swReplace all instances of hdfsw with the corresponding function in the matlab.io.hdfeos.sw package.

Graphics

Graphics Display: Leverage DPI-aware MATLAB graphics for Apple Retina displays and high-resolution displays on Windows

The appearance of graphics is improved for these system configurations:

  • Macintosh systems with Apple Retina displays

  • Windows systems in which the DPI (dots-per-inch) value is higher than 96

Previously, MATLAB allowed the operating system to scale graphical elements on these high-DPI systems. That scaling helped to maintain consistent appearance and functionality, but it also introduced undesirable effects. Graphical elements often looked blurry, and the size of those elements was sometimes inconsistent.

Instead of relying on the operating system, MATLAB is now DPI-aware, which means that it takes advantage of the full system resolution to draw graphical elements (fonts, UIs, and graphics). Thus, graphical elements appear sharp and appropriately scaled regardless of your display DPI. For more information, see DPI-Aware Behavior in MATLAB.

Compatibility Considerations

  • In order to display graphics at an appropriate scale, distances in pixels are now device-independent on Windows and Macintosh systems. If you set the Units property or FontUnits property of an object to 'pixels', the size of each pixel is as follows:

    • Windows systems — 1 pixel is 1/96 inch.

    • Macintosh systems — 1 pixel is 1/72 inch.

    • Linux® systems — No change. Pixel size determined by display DPI.

    In most cases, you do not need to modify your code. Keep in mind that specifying the size and location of graphics components in pixels might not correspond to the actual pixels on your screen. For example, when the Units property of a figure is set to 'pixels', MATLAB reports the Position and CurrentPoint property values based on device-independent pixels, not the size of the actual pixels on the screen.

  • MATLAB might report the size and location of objects as fractional values (in pixel units) more frequently than in previous releases. For example, your code might report fractional values in the Position property of a figure, whereas previous releases reported whole numbers for that same figure.

  • The ScreenSize property of the root object might not match the display size reported by high-DPI Windows systems. Specifically, the values do not match when the Units property of the root object is set to 'pixels'. MATLAB reports the value of the ScreenSize property based on device-independent pixels, not the size of the actual pixels on the screen.

  • When using getframe (or print with the -r0 option) on a high-DPI system, the size of image data array that MATLAB returns is larger than in previous releases. Additionally, the number of elements in the array might not match the figure size in pixel units. MATLAB reports the figure size based on device-independent pixels. However, MATLAB bases the size of the image array on the display DPI value.

  • The ScreenPixelsPerInch property of the root object is now read only, and the value depends on the system:

    • Windows systems — The value is 96 DPI.

    • Macintosh systems — The value is 72 DPI.

    • Linux systems — The value is determined by your display DPI.

    Also, you cannot set or query the default value of the ScreenPixelsPerInch property. These commands now return an error:

    get(groot,'DefaultRootScreenPixelsPerInch')
    set(groot,'DefaultRootScreenPixelsPerInch')
    
    The factory value cannot be queried either. This command returns an error as well:
    get(groot,'FactoryRootScreenPixelsPerInch')

Axes Object: Set the location of each axis in a plot to cross at the origin

Axes objects now have an 'origin' option for the XAxisLocation and YAxisLocation properties. Use this option to display the x-axis or y-axis so that it passes through the origin point (0,0). These properties only affect 2-D views of the axes.

Numeric Ruler Object: Customize tick format, exponent, and text style to control the appearance of an individual axis in a plot

Numeric rulers are new objects that you can use to modify the appearance or behavior of the x-axis, y-axis, or z-axis. When you create an axes object, MATLAB creates a numeric ruler for each individual axis. Modify a particular axis by setting properties of the associated numeric ruler. Access the number ruler through the new XAxis, YAxis, or ZAxis property of the axes object.

Numeric rulers have several properties that offer new types of axis customizations. Control the format of the tick labels using the TickLabelFormat property. For example, you can display the tick labels as currency values or control the number of decimal places displayed. Additionally, you can control if the tick labels use exponential notation with the Exponent property.

For a list of properties, see Numeric Ruler Properties.

histogram2 Function: Plot bivariate histograms with control over bins, normalization, and display

The histogram2 function plots bivariate histograms with data-dependent bin picking and options for bin control, normalization, and visualization.

When you specify an output argument with the histogram2 function, it returns an object that you can use to modify properties of the histogram. For example, you can change the number of bins in each dimension, use a different binning algorithm, or normalize the histogram in several ways. For more information, see Using histogram2 Objects.

histogram Function: Use categorical array inputs

The histogram function accepts categorical arrays as an input argument.

histogram objects created using categorical data contain some different properties than normal numeric histograms. For more information, see Histogram Properties.

histogram and histogram2 Functions: Interactively manipulate histograms with context menu

Histogram plots created using either histogram or histogram2 have a context menu in plot edit mode that enables interactive manipulations in the figure window.

MATLAB Charts: Use transparency in bar, scatter, and area charts

Area, bar series, and scatter series objects now support transparency. This table lists the new transparency properties for each object. Set these properties to a value between 0 (transparent) and 1 (opaque).

ObjectNew Properties
AreaFaceAlpha
EdgeAlpha
Bar seriesFaceAlpha
EdgeAlpha
Scatter seriesMarkerFaceAlpha
MarkerEdgeAlpha

Alternatively, you now can use the alpha function to change the transparency of these objects. Specify the input to alpha as a value between 0 and 1, 'opaque', or 'clear' to affect these objects.

Contour Plots: Control appearance of contour labels

Control the appearance of contour labels by setting text properties with any clabel syntax. In R2014b and R2015a, not all clabel syntaxes supported name-value pairs to set text properties.

The changes to clabel are as follows:

  • All syntaxes now support name-value pairs to set a useful subset of text properties.

  • Syntaxes that previously supported name-value pairs to set text properties now support only a subset of text properties.

For the list of supported properties, see clabel.

Compatibility Considerations

There are some text properties that you can no longer set using clabel. For example, you cannot set the Parent, Children, or UserData properties as name-value pairs. All the syntaxes that are more restrictive in terms of supported text properties continue to return text objects. If necessary, you can use those text objects to set additional properties.

opengl Function: Use a basic version of hardware-accelerated OpenGL

The opengl function now supports the hardwarebasic option. This option uses your graphics hardware, but disables these graphics features that are unstable with some graphics drivers:

  • Align vertex centers feature for sharp vertical and horizontal lines

  • Depth peel transparency feature for accurate transparency in overlapping 3-D objects

The disabled features might change in future releases as graphics features change and graphics hardware evolves.

Line Objects: Control style of line corners

Chart lines and primitive lines have a LineJoin property for controlling the style of the line corners. Options include round, chamfer, and miter styles.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations
plotmatrix function Still runsNot applicableplotmatrix now returns histogram objects instead of patch objects in its fourth output argument. Use histogram properties instead of patch properties to modify the appearance of the histogram plots. For a list, see Histogram Properties.

ghostscript function

Errors None

MATLAB no longer ships with the Ghostscript® library. Remove all instances of code that use ghostscript.m.

GUI Building

UI Display: Create DPI-aware UIs for Apple Retina displays and high-resolution displays on Windows

The appearance of UIs have improved for the following high-DPI systems:

  • Macintosh systems with Apple Retina displays

  • Windows systems in which the DPI (dots-per-inch) value is higher than 96

These are the visual improvements you might see:

  • UI components look sharp and render with full graphical detail.

  • When you create a UI object, and specify the Units as 'pixels', the size of that object is now consistent with the size of other objects. For example, the size of a push button (specified in pixels) is now consistent with the size of the text on that push button (specified in points).

For more information about the new DPI-aware behavior, see DPI-Aware Behavior in MATLAB.

Compatibility Considerations

  • In order to display UI components at an appropriate scale, distances in pixels are now device-independent on Windows and Macintosh systems. If you set the Units property or FontUnits property of an object to 'pixels', the size of each pixel is as follows:

    • Windows systems — 1 pixel = 1/96 inch

    • Macintosh systems — 1 pixel = 1/72 inch

    • Linux systems — No change. The size of a pixel is determined by the display DPI.

    In most cases, you do not need to modify your code. Keep in mind that specifying the size and location of UI components in pixels might not correspond to the actual pixels on your screen. For example, when the Units property of a figure is set to 'pixels', MATLAB reports the Position and CurrentPoint property values based on device-independent pixels, not the size of the actual pixels on the screen.

  • MATLAB might report the size and location of objects as fractional values (in pixel units) more frequently than in previous releases. For example, your code might report fractional values in the Position property of a figure, whereas previous releases reported whole numbers for that same figure.

  • The ScreenSize property of the root object might not match the display size reported by high-DPI Windows systems. Specifically, the values do not match when the Units property of the root object is set to 'pixels'. MATLAB reports the value of the ScreenSize property based on device-independent pixels, not the size of the actual pixels on the screen.

  • UIs might appear larger than in previous releases on Windows systems in which the display scaling value is greater than 100% but less (or equal to) than 125%. Also, icons in those UIs might look slightly blurry because they are enlarged to accommodate the larger UI. To avoid these effects, set the Windows DPI scaling to 100%.

For a list of related changes in Graphics, see Graphics Display: Leverage DPI-aware MATLAB graphics for Apple Retina displays and high-resolution displays on Windows.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations
menuStill runsdialogThe menu function is not recommended. Use the dialog function to create multiple choice dialog boxes.

Performance

MATLAB Execution Engine: Run programs faster with redesigned architecture

The new MATLAB execution engine includes performance improvements to function calls, object-oriented operations, and many other MATLAB operations.

These performance improvements result in significantly faster execution of many MATLAB programs with an average speed-up of 40% among 76 performance-sensitive applications from users. Of these tested applications, 13 ran at least twice as fast and only 1 slowed down by more than 10%.

The new execution engine uses just-in-time compilation of all MATLAB code which makes performance more uniform and predictable. The new engine offers improved quality and provides a platform for future performance optimizations and language enhancements.

table Data Type: Access data with improved performance when using dot-parentheses

Using dot-parentheses indexing to access elements of a table variable, for example x = T.V(I), has better performance.

Categorical Arrays: Create a larger number of categories, with improved memory efficiency and performance

  • A categorical array can contain a larger number of categories.

  • Categorical arrays with small numbers of categories use memory more efficiently.

  • Some categorical comparison and assignment operations involving scalars are faster.

Hardware Support

​Raspberry Pi 2 Model B: Acquire sensor and image data from Raspberry Pi 2 boards using the MATLAB Support Package for Raspberry Pi Hardware

You can use the MATLAB Support Package for Raspberry Pi™ Hardware with Raspberry Pi 2 Model B hardware.

​BeagleBone Black: Acquire sensor and image data from BeagleBone Black boards using the MATLAB Support Package for BeagleBone Black Hardware

You can use MATLAB commands to connect to a BeagleBone Black board over a network. For more information, see MATLAB Support Package for BeagleBone Black Hardware.

iOS Sensors: Acquire sensor data from Apple iOS mobile devices using the MATLAB Support Package for Apple iOS Sensors

The MATLAB Support Package for Apple iOS Sensors enables you to collect sensor data from your Apple iOS mobile device and log it in MATLAB. You can then process the sensor data in MATLAB in a variety of ways, including creating plots. You can collect data from these sensors:

  • Acceleration

  • Angular Velocity

  • Orientation

  • Magnetic Field

  • Position

The Apple iOS sensors product requires:

  • Installation of MATLAB Mobile™ on your Apple iOS device. You can acquire this application through the App Store.

  • Your Apple device must use iOS version 7 or later.

  • MATLAB version R2015a or later, for creating the connection to the application and logging sensor data.

  • Installation of the MATLAB Support Package for Apple iOS Sensors.

The support package includes the command-line interface in MATLAB and the ability to interact with Apple iOS sensors, which is a separate tab in MATLAB Mobile. To connect to sensors on the phone and collect data, you create a mobiledev object in MATLAB. You make the connection between your computer running MATLAB and the phone via Wi-Fi® or your cellular network. To get started, see Get Started with iOS Sensors.

R2015a

New Features, Bug Fixes, Compatibility Considerations

Desktop

Documentation: Integrate documentation for custom toolboxes into the MATLAB Help Browser

When you create custom help and add it to the MathWorks documentation, the help link appears on the Home Help page. For instance, if you add the sample Upslope Area Toolbox documentation, it appears as shown here.

When you click the link for your custom help, that help displays in the current window.

Previously, to access custom help that you added to MathWorks help, you clicked a Supplemental Software link at the bottom of the help home page. Then that help opened in a separate window.

For more information on the Upslope Area Toolbox sample and creating custom documentation, see builddocsearchdb and Display Custom Documentation.

Documentation: Determine when feature introduced

New documentation reference pages for MathWorks products include an annotation at the bottom of the page. The annotation indicates the release in which the feature was introduced. For example, "Introduced in R2015a." (Some reference pages for features introduced before R2015a also include the release information.)

Array Size Limit: Limit maximum array size to prevent unintended creation of very large matrices

MATLAB limits the amount of computer memory used to allocate memory for each mxArray. To adjust or remove this limit, use the MATLAB array size limit preference described in Workspace Browser Preferences.

Tab Completion: Complete class properties and methods while editing class definition files

When editing class definition files in the Editor, you can press the Tab key to complete the names of class properties and methods. For more information, see Tab Completion.

User Interface Preferences: Control user interface language

For computers in Japanese, Chinese, or Korean locales, you can choose to run MATLAB with an English user interface rather than in the localized language. Desktop items (such as dialog boxes, button names, and menu items) and error and warning messages will appear in English. For information about setting this option, see General Preferences.

Language and Programming

repelem Function: Repeat copies of array elements to create a larger array

The repelem function copies elements of an array into a new array according to a specified repetition scheme.

sort Function: Now preserves shape of cell array of string inputs

The sort function now preserves the shape of input cell arrays of strings and sorts each column independently. This makes the behavior for sort with a cell array of strings consistent with the behavior of sort with a numeric array.

Compatibility Considerations

Previously, sort flattened all cell array of string inputs into a vector output. This behavior treated the input cell array as a tall vector of strings, and did not preserve the size of the input. Any code that relies on the output size of sort on a cell array of strings might need to be updated.

To continue using the previous behavior, use the colon operator, :, when calling sort on a cell array, for example, sort(X(:)).

isenum Function: Determine if variable is enumeration

The isenum function tests the input argument to determine if it is an enumeration.

milliseconds Function: Convert duration to number of milliseconds

The milliseconds function converts duration values to double values in units of milliseconds.

Publishing Markup: Include external file content

External file content can be added into MATLAB published code using the new <include> markup. For information about this new markup, see External File Content.

fullfile Function: Maintain all double-dot symbols

The fullfile function now maintains all double-dot symbols in the input file parts. This behavior is consistent with the treatment of double-dot symbols in R2012b and earlier.

In R2013a through R2014b, fullfile collapsed inner relative directories indicated by double-dot (..) symbols and returned an equivalent full file path specification that did not display the symbols. The double-dot symbols were maintained only if they appeared at either end of the full file path specification.

For example, the commands,

f = fullfile('C:\foo\folder1\..\folder2')
h = fullfile('\\folder4\.')
now return:
f =
C:\foo\folder1\..\folder2
h =
\\folder4\.
In R2013a through R2014b, the same commands returned:
f =
C:\foo\folder2
h =
\\folder4\.

Compatibility Considerations

Change code that relies on resolving double-dot symbols in a full file path.

Python Version 3.4: MATLAB Support

MATLAB supports the following versions of CPython:

  • Version 2.7

  • Version 3.3

  • Version 3.4

For more information, see Install Supported Python Implementation.

MATLAB Engine for Python: Support for startup options

The engine function matlab.engine.start_matlab supports MATLAB startup options. In addition, the engine supports '-desktop' to launch MATLAB with the desktop.

MATLAB Engine for Python: Support for Unicode in Python 2.7

From Python 2.7 you can pass variables of data type unicode as input arguments to MATLAB functions. The engine can return unicode output arguments to Python 2.7.

Conversion of Character Arrays to Java Strings: Preserve null characters

In previous versions of MATLAB, the Java string was terminated at the first null.

WSDL Web Services Documents: Limitations

When you communicate with web services using web services description language (WSDL) documents, errors can occur if a WSDL file imports another WSDL file that uses the WSDL import element. For more information, see Limitations to WSDL Document Support.

Unit Testing Framework: Tag tests for categorization and selection

You can use tags to group tests into categories, and then run tests with specified tags. Tag your tests using the class-level or method-level TestTags attribute on TestCase. Select tagged test elements using the HasTag selector or the 'Tag' name-value pair on one of the following TestSuite methods: fromClass, fromFile, fromFolder, fromMethod, fromPackage, or selectIf. You also can select and run tagged tests using the 'Tag' name-value pair with the runtests function. For more information, see Tag Unit Tests.

Unit Testing Framework: Run tests in parallel

You can run a suite of tests in parallel using the Parallel Computing Toolbox. For more information, see the runInParallel method of the TestRunner class.

Unit Testing Framework: Share variables between tests in scripts

You can include a shared variables section in your script-based test file. In this section you can define variables to share between tests in the script and define any critical preconditions necessary for your tests. For more information, see http://www.mathworks.com/help/releases/R2015a/matlab/matlab_prog/write-script-based-unit-tests.html.

Unit Testing Framework: Use prebuilt test fixtures

You can manually configure your test environment, and the test runner does not need to perform shared fixture setup and teardown activities. To define prebuilt fixtures, use the PrebuiltFixtures property on the TestRunner instance in combination with the SharedTestFixtures attribute of the TestCase class. In certain testing scenarios, prebuilding fixtures can result in significant time or resource savings. An example where prebuilt test fixtures might be a benefit is a test that meets these three conditions:

  • Has shared fixtures that are expensive to set up

  • Has a required fixture state that can be set up manually in the MATLAB session

  • Does not require a fresh test fixture for each test run

For more information, see matlab.unittest.TestRunner.

Unit Testing Framework: Compare objects using isequaln

When the class of the expected value defines an isequaln method, the ObjectComparator uses that method for object comparison.

In previous releases, ObjectComparator used isequal to compare all objects. The IsEqualTo constraint and the assertEqual, assumeEqual, fatalAssertEqual, and verifyEqual qualification methods leverage ObjectComparator and, therefore, inherit the same change in behavior. For more information, see ObjectComparator.

Compatibility Considerations

Rewrite your tests to force a comparison with isequal when you use ObjectComparator to compare objects of a class that defines isequaln and you rely on the results of isequal instead of isequaln.

For example, if the class of expObj defines isequaln, then testCase.verifyEqual(actObj,expObj) uses isequaln for comparison, but testCase.verifyReturnsTrue(@()isequal(actObj,expObj)) uses isequal.

Similarly, testCase.verifyThat(actObj,IsEqualTo(expObj)) uses isequaln for comparison, but testCase.verifyThat(@()isequal(actObj,expObj),ReturnsTrue) uses isequal.

Unit Testing Framework: Use homogeneous expected causes with Throws constraint

When you specify expected causes using the 'CausedBy' name-value pair argument in the Throws constraint, the causes must be a cell array of strings or an array of meta.class instances.

In previous releases, you specified the value of 'CausedBy' as a cell array that could contain both strings and meta.class instances. For more information, see matlab.unittest.constraints.Throws.

Compatibility Considerations

Rewrite tests that use the Throws constraint and specify heterogeneous data types for 'CausedBy'. If you cannot define expected causes using either a cell array of strings or an array of meta.class instances, consider performing the qualification using two separate Throws constraints.

Git Source Control Integration: View branch details and delete branches

When using the Git™ source control integration, you can view branch details and delete branches in the Manage Branches dialog box. Use the Branch Browser to see which files changed for a particular commit in the branch or to view the author, date, and commit message.

For more information, see Branch and Merge with Git.

C Matrix Library: New functions

The new functions mxCreateUninitNumericMatrix and mxCreateUninitNumericArray create numeric arrays without initializing the data elements. If you want to initialize the data elements, use the functions mxCreateNumericMatrix and mxCreateNumericArray.

To convert an mxArray to a C-style string in UTF-8 encoding, call the new mxArrayToUTF8String function.

To determine if an mxArray contains scalar data, call the new mxIsScalar function.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations

isglobal

Errors

none

Refactor any code that uses isglobal. Avoid conditions in your code that check variable scope. If you need to convert your code quickly in the short term, replace isglobal with ~isempty(whos('global','variable')). However, you should refactor your code to avoid conditional checks on variable scope.

matlab.unittest.
TestCase
constructor

Warns

matlab.unittest.TestCase.forInteractiveUse

Replace all instances of creating a TestCase object using the default constructor.

Use the TestCase.forInteractiveUse static method for interactive, command line use.

When you run tests in the unit testing framework, the test runner creates the instances.

verctrl

Still runs

Source control action through context menu

Access source control actions through the context menu instead of using verctrl.

cmopts

Still runs

Click the Preferences button on the Home tab, and select General > Source Control.

View the currently selected source control system through Preferences instead of using cmopts.

checkin
checkout
customverctrl
undocheckout

Still runsnone

Replace this functionality with one of the following options.

Mathematics

discretize Function: Group numeric data into bins or categories

The discretize function groups numeric data into bins. By default the bins are numeric, and discretize returns indices describing the bin placement of each element. However, the bins also can be categories, in which case discretize returns a categorical array.

Descriptive Statistics: Omit NaN values in basic statistical calculations, including max, min, mean, median, sum, var, std, and cov

The following functions now have flags to include or omit NaN values in numeric computations: max, min, mean, median, sum, var, std, and cov.

ismembertol and uniquetol Functions: Perform set comparisons using a tolerance

The ismembertol and uniquetol functions perform set operations using a tolerance. These functions are useful in situations where floating-point round-off errors occur in calculations.

Random Numbers: Generate random numbers using the double-precision, SIMD-oriented Fast Mersenne Twister (dSFMT) algorithm

The dSFMT random number generator algorithm provides a faster implementation of the Mersenne Twister algorithm. For more information about available random number generator algorithms, see Creating and Controlling a Random Number Stream.

nearestNeighbor Function: Determine nearest alphaShape boundary point

The nearestNeighbor function for alphaShape determines the nearest boundary point on the alpha shape for a specified query point.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations

bitmax

Errors

flintmax

Replace all instances of bitmax with flintmax.

Data Import and Export

Datastore: Read one complete file with 'file' option for ReadSize property

The ReadSize property for TabularTextDatastore objects now accepts the string value, 'file'. This option reads one complete text file at a time. For more information, see TabularTextDatastore Properties.

Datastore: Read data in parallel from a datastore with partition function using Parallel Computing Toolbox

The partition function partitions a datastore into a number of parts. You then can specify a subset of the datastore to read. If you have Parallel Computing Toolbox installed, you can read datastore parts in parallel without using MapReduce.

webwrite Function: Send data to RESTful Web services using HTTP POST method

The webwrite function sends data to RESTful Web services using an HTTP POST request.

webread and websave Functions: Request data from RESTful Web services using HTTP POST method

The webread and websave functions can request data using both HTTP GET and POST methods.

xlsread and readtable Functions: Read larger spreadsheet files from Excel software

The xlsread and readtable functions can read larger spreadsheet files on Windows computers with Excel® software installed.

textscan and readtable Functions: Return consistent results when reading quoted strings

As of R2014b, using the %q format specifier with the textscan and readtable functions returns consistent results. When using %q to read strings that begin with a double quotation mark ("), textscan and readtable remove the leading double quotation mark and its accompanying closing mark. The closing mark is the second instance of a lone, unescaped double quotation mark. The functions replace escaped double quotation marks (for example, ""abc"") with lone double quotation marks ("abc"). The textscan and readtable functions ignore any double quotation marks that follow the closing mark.

In R2014a and earlier, the textscan and readtable functions return unpredictable results when reading strings with extraneous double quotation marks. This behavior can occur when you use the %q format specifier or if you do not specify a value for the Format name-value pair argument to readtable.

For example, these commands:

C = textscan('"Alvin ""Al"" Smith"','%q','Delimiter',',');
C1 = C{:}
D = textscan('"Alvin" "Al" Smith"','%q','Delimiter',',');
D1 = D{:}
E = textscan('"Alvin ""Al"" Smith" and Brian"""Jones','%q','Delimiter',',');
E1 = E{:}
now return:
C1 = 
    'Alvin "Al" Smith'
D1 = 
    'Alvin "Al" Smith"'
E1 = 
    'Alvin "Al" Smith and Brian"""Jones'

In R2014a and earlier, the same commands return:

C1 = 
    'Alvin "Al" Smith'
D1 = 
    'Alvin "Al Smith"'
E1 = 
    'Alvin "Al" Smith and Brian""Jones'

Compatibility Considerations

Code that relies on using the %q format specifier to read text enclosed in double quotation marks might return different results. Such code includes calls to readtable that do not specify a value for the Format name-value pair argument. However, there is no behavior change when reading strings with proper double quotation marks.

Scientific File Format Libraries: Upgrades

This table lists upgrades to scientific file format libraries used by MATLAB.

LibraryVersion
HDF5

1.8.12 (upgraded from 1.8.6)

Compatibility Considerations

The H5Pset_dxpl_multi and H5Pget_dxpl_multi routines were removed from the HDF5 Library as of version 1.8.11. As a result, the H5P.set_dxpl_multi and H5P.get_dxpl_multi functions in MATLAB now return an error. Remove instances of H5P.set_dxpl_multi and H5P.get_dxpl_multi from your code.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations

KeyValueLimit property of KeyValueDatastore class

Still Runs

ReadSize property of KeyValueDatastore class

Replace all instances of KeyValueLimit with ReadSize.

RowsPerRead property of TabularTextDatastore class

Still Runs

ReadSize property of TabularTextDatastore class

Replace all instances of RowsPerRead with ReadSize.

urlread for HTTP POST requestsStill runswebread
webwrite
Use webread for reading content with an HTTP POST request. Use webwrite for sending data with an HTTP POST request.

H5P.get_dxpl_multi

Errorsnone

Remove all instances of H5P.get_dxpl_multi.

H5P.set_dxpl_multi

Errorsnone

Remove all instances of H5P.set_dxpl_multi.

Graphics

drawnow Function: Improve performance in animation loops with new option

drawnow now supports the limitrate option for limiting the number of figure updates to 20 frames per second. If you are updating graphics objects in a loop and do not need to see every update on the screen, you can use this option to skip some updates for a faster animation.

Functionality being removed or changed

FunctionalityResultUse InsteadCompatibility Considerations
drawnow update syntaxStill runs drawnow limitrateReplace all instances of drawnow update with drawnow limitrate.
drawnow expose syntaxStill runsdrawnow nocallbacksReplace all instances of drawnow expose with drawnow nocallbacks.

Performance

MapReduce: Run mapreduce algorithms on any computer cluster that supports parallel pools using MATLAB Distributed Computing Server

The mapreduce function now runs on any cluster that supports a parallel pool.

For more information about mapreduce execution environments, see Speed Up and Deploy MapReduce Using Other Products.

Interpolation Functions: Execute faster with multithreaded calculations

The griddedInterpolant, interp1, interp2, interp3, and interpn functions show significant performance improvement by using multithreading in large calculations.

Hardware Support

IP camera: Acquire video directly from Internet Protocol cameras

You can use the MATLAB IP Camera support to bring live images into MATLAB Images can be from any IP Camera that supports Motion JPEG stream over HTTP or RTSP with basic authentication support. IP cameras, also referred to as netcams or network cameras, are increasingly popular in live image processing applications.

With simple MATLAB functions you can preview your image, acquire single snapshots from the camera, and optionally set up a loop of acquired images. The ipcam function creates the IP Camera object that is used to acquire images, and the snapshot function returns a single image from the camera.

IP Camera support is available only through a hardware support package. Download and install the necessary files using the Support Package Installer, which you open by typing supportPackageInstaller in MATLAB. On the Select support package to install screen, select IP Cameras from the list.

You can use MATLAB IP Camera support on the following platforms:

  • Microsoft Windows 32-bit and 64-bit

  • Mac OS X 64-bit

  • Linux

For more information about the IP camera support, see the MATLAB Support Package for IP Cameras documentation, which is available when you download the support package.

BeagleBone Black Hardware: Access BeagleBone Black hardware with the MATLAB Support Package for BeagleBone Black Hardware

You can use MATLAB commands to connect to a BeagleBone Black board over a network and perform the following operations:

  • Exchange data with sensors and actuators that are connected to the ADC, GPIO, I2C, PWM, serial port, and SPI interfaces

  • Take photographs using a web camera

  • Issue Linux shell commands

  • Transfer files to or from your host computer

  • Control the onboard LED

Using the command-line interface in MATLAB, you can:

  • Start programing without additional toolboxes.

  • Interactively develop and debug programs in MATLAB.

  • Acquire and process sensor data in MATLAB in a variety of ways, including creating plots.

Arduino Hardware: Access to Arduino Leonardo and other boards with the MATLAB Support Package for Arduino Hardware

You can now use these boards with MATLAB Support Package for Arduino® Hardware:

  • Arduino Leonardo

  • Arduino Micro

  • Arduino Mega ADK

  • Arduino Nano 3.1

  • Sparkfun Redboard

  • Sparkfun Digital Sandbox

  • Sainsmart Uno

  • Sainsmart Mega 2560

Arduino Hardware: New configurePin function

In release R2015a, use configurePin to set your pin mode. You can use string values, such as ‘D2' to specify digital pins.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations

targetinstaller

Warns

supportPackageInstaller

Replace all instances of targetinstaller with supportPackageInstaller.

configureAnalogPinWarnsconfigurePinReplace all instances of configureAnalogPin with configurePin.
configureDigitalPinWarnsconfigurePinReplace all instances of configureDigitalPin with configurePin.

R2014b

New Features, Bug Fixes, Compatibility Considerations

Desktop

Git and Subversion source control system integration through Current Folder browser, including syncing from Web-hosted repositories such as those on GitHub

The MATLAB Current Folder browser includes a column with source code status for files that are contained in Git and Subversion® repositories. You can retrieve repositories and access source control functionality through the context menus. For more information, see Source Control Integration.

Packaging of custom MATLAB toolboxes into a single, installable file

You can package your toolbox as a single installer file (.mltbx) that contains all of the code, data, apps, documentation, and examples necessary to use your toolbox. Share your toolbox with others by uploading the installer file to the File Exchange or by sending it as an email attachment. For more information, see Create and Share Toolboxes.

Dialog box for managing custom MATLAB toolboxes

You can use the Manage Custom Toolboxes dialog box to view details about the installed custom toolboxes or to uninstall the toolboxes. To access the Manage Custom Toolboxes dialog box, go to the Resources section of the Home tab and select Manage Custom Toolboxes from the Add-Ons menu.

Preference for controlling the initial working folder, with the option to start in the folder from your previous MATLAB session

For information about setting this option, see General Preferences.

Compatibility Considerations

On Windows platforms, do not use the Start in field in the MATLAB Properties window. Instead, use the Specify the full path to a folder option in the Preferences panel.

Copying and pasting variables in the Workspace browser

You now can copy and paste the contents of workspace variables in the Workspace browser. Just right-click, select Copy, and then Paste. Alternatively, you can use the Ctrl+C and Ctrl+V keyboard shortcuts. Previously, this action opened the Import Tool for importing the variable name as a string.

Self-paced eLearning available from within MATLAB

MATLAB Academy is the entry point to self-paced eLearning from within MATLAB. Through MATLAB Academy, you can participate in interactive training courses to get you started with MATLAB.

To access MATLAB Academy from within MATLAB, go to the Resources section of the Home tab and select MATLAB Academy from the Help menu. Alternatively, you can access MATLAB Academy from the Getting Started with MATLAB documentation or online at https://matlabacademy.mathworks.com/R2014b. You must have a MathWorks account associated with an active license.

New startup switch to opt out of automatically switching to software OpenGL

If MATLAB detects it is running with a graphics driver that has known issues, it automatically switches to software OpenGL®. You can opt out of this behavior by calling MATLAB with the -nosoftwareopengl startup option. See matlab (Windows) or matlab (UNIX).

To re-enable automatic switching to software OpenGL, call MATLAB with the -softwareopengl startup option.

These startup options are not available on Mac platforms.

Color settings preferences in Comparison Tool

You can change and save your color preferences for the MATLAB Comparison Tool. Apply your color preferences when comparing text files, MAT-files, variables, model files, zip files, or folders. For details, see Change Color Preferences.

Automatic file saving when you click away from the Editor

If you are editing a file in the MATLAB Editor that you have saved at least once, new changes are automatically saved if you click away from the Editor.

This setting is on by default, and is accessible through MATLAB Editor/Debugger Preferences. On the Home tab, in the Environment section, click Preferences, and select Editor/Debugger. Disable the setting under Automatic file changes by clearing the Save changes upon clicking away from a file check box.

Language and Programming

datetime, duration, and calendarDuration arrays for efficient computation, comparison, and formatted display of dates and times

datetime, duration and calendarDuration are new data types for representing dates and times. You can manipulate arrays of these types in the same way that you work with numeric arrays. For example, you can add, subtract, sort, compare, concatenate, and plot date and time values.

The new data types support the following features:

  • Functions for both calendar computations and fixed-length time computations on absolute dates and times, and elapsed times

  • TimeZone property for setting and converting datetime time zone, accounting for daylight saving time

  • Customizable default display format for dates

  • Nanosecond precision for absolute times

  • Import of data as datetime arrays using the Import Tool and the readtable and textscan functions

For more information, see Dates and Time.

Compatibility Considerations

When importing data from spreadsheets or text files using the Import Tool, there is no longer an option to convert dates to numeric serial date numbers. Instead, import the data into a table or as column vectors, and specify the datetime data type for each column of dates.

Suggested corrections for syntax errors in the Command Window

MATLAB suggests corrections for function names mistyped in the Command Window. This functionality now includes suggestions for:

  • Missing closing parentheses or brackets such as ), ], and } in function calls and arrays

  • Common assignment operators such as ++, +=, and -=, and mathematical operator idioms such as 2(x+1)

  • Python argument syntax and dictionary syntax

Suggested MathWorks products for undefined functions

MATLAB suggests which MathWorks product is required for an undefined function. This information includes links to documentation and product information. For example, if you do not have the Aerospace Toolbox,

angle2quat
To use 'angle2quat', you might need:
  angle2quat - Aerospace Toolbox

Prior to R2014b, MATLAB displayed an ‘Undefined function' error.

Create multiple search indexes for help files you create

You can create multiple search indexes for help files you create: one for when you use MATLAB R2014a or earlier, and another for when you use MATLAB 2014b.  MATLAB automatically uses the appropriate index for searching your documentation database. For details, see builddocsearchdb

py package for using Python functions and objects in MATLAB, and an engine interface for calling MATLAB from Python

For information about calling Python functions in MATLAB, see Call Python Libraries.

For information about calling MATLAB from Python, see MATLAB Engine for Python.

matlab.wsdl.createWSDLClient function for accessing SOAP-based Web services

You must download supported versions of the Oracle® Java JDK™ and the Apache™ CXF programs. For information, see Set Up WSDL Tools.

RPC-encoded WSDL documents are not supported. For these documents, use createClassFromWsdl.

The following WSDL documents are not supported:

  • Some documents with messages containing multiple parts.

  • Some documents with schemas containing anonymous complex types.

  • Documents that the Apache CXF program cannot compile into complete code.

Compatibility Considerations

createClassFromWsdl, createSoapMessage, callSoapService, and parseSoapResponse will be removed in a future release. Use matlab.wsdl.createWSDLClient instead.

Graphics objects in MEX-files use object handles instead of numeric handles

Graphics objects use object handles of various types instead of the numeric handles used in previous releases.

Compatibility Considerations

Do not write MEX-file code using the mexGet or mexSet functions, which assume a handle to a graphics object is a numeric value. Use the mxGetProperty or mxSetProperty functions instead. For more information, see Upgrade MEX-Files to Use Graphics Objects.

Workflow improvements when editing classdef files, including immediate impact on existing and new workspace variables

This feature eliminates the need to clear existing objects or call clear classes when changing the definition of the object's class. This feature also provides the ability to create objects based on the new definition without generating a warning that the class has changed. MATLAB updates existing objects according to the new class definition. For more information, see Automatic Updates for Modified Classes.

MATLAB errors attempting to define listener for nonobservable property

In previous releases, you could define a listener for a nonobservable property. MATLAB silently ignored the listener and did not call the listener callback. With release MATLAB 2014b, attempting to create a listener using event.proplistener or addlistener for a nonobservable property causes an error.

Compatibility Considerations

If your code used meta-data or the properties function to get a list of all properties defined by a class, and then assigns listeners to all properties, you should change your code. Rewrite the code to determine if a given property is observable before assigning the listener. For example, this code determines which properties of MyClass are SetObservable or GetObservable.

mc = ?MyClass;
p = findobj(mc.PropertyList,'SetObservable',1,'-or','GetObservable',1)

p contains the meta.property objects for the properties of MyClass that are SetObservable or GetObservable.

Script-based tests in unit testing framework

The MATLAB unit testing framework now provides script-based writing, execution, and verification of tests as an alternative to writing function-based or class-based tests. For more information, see Write Script-Based Unit Tests.

Plugin to report code coverage in unit testing framework

The matlab.unittest testing framework provides a plugin that produces a code coverage report for MATLAB source code. For more information, see the matlab.unittest.plugins.CodeCoveragePlugin documentation.

Control logging and verbosity in unit testing framework

Test authors can control the verbosity of logged messages in their tests. To register messages at different verbosity levels, call the log method with a TestCase or Fixture. To control the verbosity of the output, use a plugin such as LoggingPlugin or TestRunProgressPlugin, or a test runner constructed with the TestRunner.withTextOutput method.

Constraint for scalar values in unit testing framework

You can use the matlab.unittest.constraints.IsScalar constraint class to test that an actual value is a scalar.

Test suites from packaged functions and scripts

The unit testing framework recognizes function-based and script-based tests that are contained within a user-defined package. For more information, see TestSuite.fromPackage and runtests.

Failure of unit tests using a relative tolerance when the expected value is infinite and the actual value is finite

If a test qualification applies a relative tolerance and the expected value is infinite, the test fails if the actual value is finite. For example,

tc = matlab.unittest.TestCase.forInteractiveUse;
tc.verifyEqual(1,Inf,'RelTol',1e-12);
Interactive verification failed.

---------------------
Framework Diagnostic:
---------------------
verifyEqual failed.
--> The values are not equal using "isequaln".
--> The error was not within relative tolerance.
--> Failure table:
            Index    Actual    Expected    Error    RelativeError    RelativeTolerance
            _____    ______    ________    _____    _____________    _________________
        
            1        1         Inf         -Inf     NaN              1e-12            

Actual double:
         1
Expected double:
       Inf

Compatibility Considerations

Change any instances of test qualifications in which you compare an infinite expected value to a finite actual value using a relative tolerance, and expect the test to pass.

rmdir treatment of asterisk as literal character on Linux and Mac

On Linux and Mac platforms, the rmdir function treats the asterisk character (*) as a literal character if a file or folder named * exists in the current folder. If such a file or folder does not exist, then rmdir treats the asterisk as a wildcard character. On Windows, rmdir always treats * as a wildcard character.

Previously, rmdir treated * as a wildcard character on all platforms.

Compatibility Considerations

Change code that expects to remove all files and folders using a wildcard character, on Linux and Mac.

Functionality being removed or changed

FunctionalityResultUse This InsteadCompatibility Considerations

createClassFromWsdl

Warns

matlab.wsdl.createWSDLClient

Replace all instances of createClassFromWsdl with matlab.wsdl.createWSDLClient.

RPC-encoded WSDL documents are not supported.

createSoapMessage
callSoapService
parseSoapResponse

Still runs

matlab.wsdl.createWSDLClient

Replace all instances of createClassFromWsdl with matlab.wsdl.createWSDLClient.

matlab.unittest.
TestCase
constructor

Still runs

matlab.unittest.TestCase.forInteractiveUse

Replace all instances of creating a TestCase object using the default constructor.

Use the TestCase.forInteractiveUse static method for interactive, command line use.

When tests are run in the unit testing framework, instances are created by the test runner.

matlab.unittest.plugins.
TestSuiteProgressPlugin

Still runs

matlab.unittest.plugins.TestRunProgressPlugin

Replace all instances of TestSuiteProgressPlugin.

To construct a plugin with the same level of detail, use TestRunProgressPlugin.withVerbosity(2).

mexGet
mexSet

Errors

mxGetProperty
mxSetProperty

For MEX-files, replace all instances of mexGet and mexSet with mxGetProperty or mxSetProperty in the C/C++ and Fortran Matrix Library.

Mathematics

histcounts function for binning numeric data

The histcounts function sorts data into bins with data-dependent bin picking and options for bin control and normalization.

triangulation functions nearestNeighbor and pointLocation for identifying the closest vertex and enclosing triangle or tetrahedron for specified point

The nearestNeighbor function identifies the closest vertex to a query point, and the pointLocation function identifies the enclosing triangle or tetrahedron for a query point.

Option for interpolating to 'next' and 'previous' neighbors with the interp1 function and griddedInterpolant class

The interp1 function and griddedInterpolant class now have 1-D support for interpolating to 'next' and 'previous' neighbors.

The computation time and memory requirements for 'next' and 'previous' are the same as 'nearest'.

Option for rounding numbers to a specified number of decimal or significant digits using the round function

The round function can now round to any specified number of decimal or significant digits.

For example, you can round pi to 2 decimal digits:

round(pi,2)
ans =

    3.1400

Or, you can round pi to 2 significant digits:

round(pi,2,'significant')
ans =

    3.1000

boundary function and alphaShape class for creating a conforming boundary around a discrete set of points

The boundary function and alphaShape class create enveloping boundaries, polygons, or polyhedra around a discrete set of 2-D or 3-D points, including options for tightening or loosening the boundaries around the points.

cummin and cummax functions for computing cumulative minimum and maximum of an array

The cummax and cummin functions compute the cumulative maximum and minimum values in an array. For example,

A = magic(4)

A =

    16     2     3    13
     5    11    10     8
     9     7     6    12
     4    14    15     1

B = cummin(A)

B =

    16     2     3    13
     5     2     3     8
     5     2     3     8
     4     2     3     1

C = cummax(A)

C =

    16     2     3    13
    16    11    10    13
    16    11    10    13
    16    14    15    13

Reverse accumulation option for the cumsum, cummin, cummax, and cumprod functions

The 'reverse' option for cumsum, cumprod, cummin, and cummax reverses the direction of cumulation, working from end to 1 in the active dimension. This option allows quick directional calculations without requiring a flip or reflection of the input array.

Median and mode calculations of categorical data

The median and mode functions now support categorical arrays as inputs.

Functionality being removed or changed

Functionality

Result

Use Instead

Compatibility Considerations

bitshift(A,k,N)

Errors

bitshift(A,k,assumedtype)

Replace all instances of bitshift(A,k,N) with bitshift(A,k,assumedtype).

bitcmp(A,N)

Errors

bitcmp(A,assumedtype)

Replace all instances of bitcmp(A,N) with bitcmp(A,assumedtype).

histc function

Still Runshistcounts function

Replace all instances of histc with histcounts

Data Import and Export

Faster data import from text files using Import Tool, and readtable and textscan functions

The performance of the Import Tool, the readtable function, and the textscan function improves for text files.

Import of data as categorical and datetime arrays using the readtable and textscan functions

The readtable and textscan functions can read data from text files a categorical or datetime arrays. Use the %C conversion specifier to read text as a category name. Use the %D conversion specifier to read text as a datetime value.

Data import from text files and collections of text files that do not fit into memory with datastore

The datastore function creates a datastore for reading collections of data that are too large to fit in memory. For example, TabularTextDatastore works with collections of text files.

VideoReader performance improvements and ability to start reading from a specified time in the video

The VideoReader.hasFrame and VideoReader.readFrame methods allow for improved performance when reading video files. The methods check for and read the next available frame in the video. You can set the CurrentTime property to begin reading from a specified time in the video file. This simplifies seeking into variable frame-rate video.

Compatibility Considerations

When you first create the VideoReader object, VideoReader no longer automatically populates the NumberOfFrames property . This behavior greatly improves performance, especially for large files. The NumberOfFrames property will be removed in a future release, and is now hidden when displaying the properties of a VideoReader object. When you use the get function to query a VideoReader object, the output structure array now has a CurrentTime field and no longer has a Type field or a NumberOfFrames field. You cannot query the NumberOfFrames property if you have invoked the readFrame or hasFrame methods, or if you have explicitly set the CurrentTime property.

If VideoReader cannot determine the duration of the video file, then the Duration property is empty ([]). Previously the Duration property was set to zero.

tcpclient function for reading and writing data from network connected devices and servers using socket-based connections

TCP, or Transmission Control Protocol, is a highly used networking protocol. The MATLAB TCP/IP client support uses raw socket communication and lets you connect to remote hosts in MATLAB for reading and writing data. For example, you could use TCP/IP to acquire data from a remote weather station, and then plot the data.

You can create a TCP/IP connection to a server or hardware and perform read/write operations. Use the tcpclient function to create the connection, and the write and read functions for synchronously reading and writing data.

webread function for importing online data including JSON, CSV, and image data

The webread function reads content from RESTful Web services. You can use webread to import image, text, and JSON data from Web services into MATLAB. You also can use websave to write data imported from a Web service to file.

Reading non-ASCII encoded files with readtable function

The readtable function can read text files with non-ASCII character encoding schemes. Use the optional 'FileEncoding' name-value pair argument to specify the encoding.

Writing quoted strings with writetable function

The writetable function can write quoted strings to text files. Use the optional 'QuoteStrings' name-value pair argument to enclose MATLAB strings in double quotation marks when writing to a file.

hdftool functionality will not be removed

The R2013a Release Notes originally stated that hdftool would be removed in a future release. As of R2014b, there are no plans to remove this functionality. MATLAB no longer issues a warning when you call hdftool.

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
movie2aviStill RunsVideoWriterRemove all instances of movie2avi. Write to AVI files with VideoWriter.
avifileErrorsVideoWriterReplace all instances of avifile with VideoWriter.
avireadErrorsVideoReaderReplace all instances of aviread with VideoReader.
exifreadErrorsimfinfoReplace all instances of exifread with imfinfo.
urlread

Still runs

webreadUse webread only for reading content with HTTP GET requests. To send data using HTTP POST, continue to use urlread.
urlwrite

Still runs

websaveReplace all instances of urlwrite with websave.
read method of VideoReader class

Still runs

readFrame method of VideoReader classReplace all instances of read with readFrame.
NumberOfFrames property of VideoReader class

Still runs

noneRemove all instances of NumberOfFrames. When reading a video file, use the CurrentTime property to specify where reading should begin.
hdfgdStill runsmatlab.io.hdfeos.gdReplace all instances of hdfgd with the corresponding function in the matlab.io.hdfeos.gd package.
hdfsdStill runsmatlab.io.hdf4.sdReplace all instances of hdfsd with the corresponding function in the matlab.io.hdf4.sd package.
hdfswStill runsmatlab.io.hdfeos.swReplace all instances of hdfsw with the corresponding function in the matlab.io.hdfeos.sw package.

Hardware Support

Documentation installation with hardware support package

Starting in R2014b, each hardware support package installs with its own documentation. See Supported Hardware for more information on support packages.

Support package for Android sensors

The MATLAB Support Package for Android™ Sensors allows you to collect sensor data from your mobile Android device and log it in MATLAB. You can then process the sensor data in MATLAB in a variety of ways, including creating plots. You can collect data from the following sensors:

  • Acceleration

  • Angular Velocity

  • Orientation

  • Magnetic Field

  • Position

The Android Sensors product requires the following:

  • MATLAB Mobile must be installed on your Android phone. You can acquire this app though the Google Play™ Store.

  • MATLAB is required for creating the connection to the app and logging sensor data.

  • Download and install the MATLAB Support Package for Android Sensors.

The support package includes the command-line interface in MATLAB and the ability to activate the Android Sensors mobile app, which is a separate tab in MATLAB Mobile. You must create a mobiledev object in MATLAB to connect to the sensors on the phone, and collect the data. The connection between your computer running MATLAB and the phone is done via Wi-Fi or your cellular network. To get started, see MATLAB Support Package for Android Sensors.

Support package for Arduino hardware

The MATLAB Support Package for Arduino Hardware allows you to send and receive data on Arduino devices. You can then process this data in MATLAB in a variety of ways, including creating plots. You can collect data from the following sensors connected to your Arduino hardware:

  • I2C

  • SPI

  • Servo Motors

The support package includes the command-line interface in MATLAB. For more information see MATLAB Support Package for Arduino Hardware.

Support package for LEGO MINDSTORMS EV3 hardware

You can use MATLAB Support Package for LEGO® MINDSTORMS® EV3 Hardware on 32-bit and 64-bit Microsoft Windows systems, Mac OS, and Linux systems.

Use the LEGO MINDSTORMS EV3 hardware that connects to your system over a USB, Wi-Fi, or Bluetooth® connection to:

  • Get data from EV3 color, gyroscopic, infrared, ultrasonic, and touch sensors.

  • Get data from an EV3 Remote Infrared Beacon.

  • Control and get data from EV3 motors.

  • Interact with the LCD, status light, speaker, and buttons on the EV3 brick.

Using the command-line interface in MATLAB, you can:

  • Start programing without additional toolboxes.

  • Interactively develop and debug programs in MATLAB.

  • Acquire and process sensor data in MATLAB in a variety of ways, including creating plots.

  • Run control loops at up to 25 Hz (not in real time).

Graphics

Major update of MATLAB graphics system

Starting in R2014b, the MATLAB graphics system is built on an improved infrastructure with a new look and includes many new features for improved charts and customizations. For more information on the new features and for compatibility considerations, see the remaining graphics release notes.

New look of MATLAB graphics with improved clarity and aesthetics

MATLAB graphics has a new look with many enhancements and new features, including:

  • A new default colormap called parula, a lighter figure background color, and new colors when plotting multiple lines to emphasize plotted data.

  • Anti-aliased fonts and lines for smoother text and graphics. For more information, see the GraphicsSmoothing property for figures and the FontSmoothing property for axes and text objects.

  • New axes properties for setting the grid line colors and for controlling the title and axis label font sizes. For more information, see the GridColor, TitleFontSizeMultiplier, and LabelFontSizeMultiplier properties.

  • Filled contour plot enhancements. For example, line breaks around the contour labels make the labels easier to read. Additionally, there are no longer outlines around the data limits, so they are easier to distinguish from contour lines.

Compatibility Considerations

Most of the new look changes are visual differences and should not affect your code. For troubleshooting topics related to the new look, see Why Are Plot Lines Different Colors? and How Do I Make the Graph Title Smaller?.

Improved infrastructure based on MATLAB objects

Starting in R2014b, the MATLAB graphics system is built on an improved infrastructure. Graphics objects now behave like other MATLAB objects:

  • Graphics objects use object handles of various types instead of the numeric handles used in previous releases.

  • Graphics objects support dot notation for getting and setting properties. Property names are case-sensitive when using dot notation.

Compatibility Considerations

Most code written for numeric handles still works with object handles. However, you should not perform operations that assume or require handles to be numeric values. For strategies to update existing code to work with object handles, see Graphics Handles Are Now Objects, Not Doubles.

Rotatable axis tick labels

New axes properties support rotated axis tick labels. For more information, see the XTickLabelRotation, YTickLabelRotation, and ZTickLabelRotation property descriptions.

Automatic update of datetime and duration tick labels with plot function

The plot function now supports the datetime and duration data types. Axis ticks and labels automatically update with the zoom, pan, and resize operations.

histogram function for plotting histograms

The histogram function plots histograms with data-dependent bin picking and options for bin control, normalization, and visualization.

Unlike the hist function, when you specify an output argument with the histogram function, it returns a histogram object that you can use to modify the properties of the histogram. For example, you can change the number of bins, use a different binning algorithm, or normalize the histogram in several ways. For more information, see Using histogram Objects.

animatedline function for creating line animations

The animatedline function optimizes line animations by accumulating and plotting data from a streaming data source.

Display of multilingual text and symbols

Axis tick labels support TeX and LaTeX markup for special characters, such as superscripts, subscripts, and Greek letters. By default, the axes interprets tick label characters using TeX markup. For more information, see the TickLabelInterpreter property of the axes. You also can use Unicode characters in axis tick labels, as well as in user interface objects.

Support for multiple colormaps in single figure

Figures support using a unique colormap for each axes in the figure. Specify an axes colormap by passing the axes handle to the colormap function.

Pie charts of categorical data with automatic slice labels

Pie charts support categorical data and automatically label the slices.

Image conversion functions rgb2gray and im2double, no longer requiring Image Processing Toolbox

MATLAB now includes the rgb2gray and im2double functions, which previously required the Image Processing Toolbox™. Use rgb2gray to convert RGB images or colormaps to grayscale. Use im2double to convert an image to double-precision values.

imshow function for displaying images from matrices or files, no longer requiring Image Processing Toolbox

MATLAB now includes the imshow function, which previously required the Image Processing Toolbox. Use imshow to display images from matrices or files.

savefig option that creates more compact files

Saving figures in .fig files with savefig creates more compact files using the 'compact' option. Use this option with .fig files to be opened only in MATLAB version R2014b or later.

Compatibility considerations for graphics changes

The graphics changes introduced in R2014b support most of the functionality from previous releases, although there are some differences. Some of the changes that you are most likely to encounter are listed here.

  • Plotting multiple lines with hold on uses the next color in the color order instead of starting from the first color with each plotting command.

  • The Clipping property clips plotted objects to the six sides of the axes box defined by the axis limits. In previous releases, the Clipping property clips objects to the smallest 2-D rectangle that encloses the axes.

  • If you add new data to a graph after using an axis command, such as axis tight, then MATLAB automatically updates the limits to incorporate the new data. In previous releases, MATLAB does not update the axis limits based on changes in the data.

  • Colorbars and legends are no longer axes objects. They are new types of objects with their own sets of supported properties.

  • The Children property for charting objects, legends, and colorbars no longer contains handles to underlying objects.

  • copyobj no longer copies callbacks and application data. If you have existing code that copies object callback properties and object application data, use the copyobj function with the 'legacy' option. This behavior is consistent with versions of copyobj before MATLAB release R2014b.

For troubleshooting topics related to these changes, see Graphics Changes in R2014b. For a list of removed properties and syntaxes, see the tables under Properties and syntaxes being removed or changed and Save and print functionality being removed or changed.

Some graphics features might not work or might be unreliable because of outdated graphics drivers. For the best results with graphics, upgrade to the latest graphics drivers provided by your graphics hardware manufacturer. For more information, see System Requirements for Graphics.

Properties and syntaxes being removed or changed

FunctionalityResultUse InsteadCompatibility Considerations
hold all syntaxStill runs hold onReplace all instances of hold all with hold on.
hist functionStill runshistogram functionUse histogram instead of hist.
colorbar('peer',ax) syntaxStill runscolorbar(ax)Replace all instances of colorbar('peer',ax) with colorbar(ax).
Using 0 to access the root objectStill runsgroot commandUse the groot command to access the root object instead of 0.
EraseMode property for all graphics objectsWarnsNot applicableRemove all instances of the EraseMode property. For more information, see How Do I Replace the EraseMode Property?.
noanimate functionWarnsNot applicableRemove all instances of the noanimate function. For more information, see How Do I Replace the EraseMode Property?.
HitTestArea property for group, transform, and chart objectsErrorsThe PickableParts propertyRemove all instances of the HitTestArea property. To control the area of an object that captures mouse clicks, use the PickableParts property.
Using the vertical slash character (|) in a string to separate text for tick labels or text objectsDoes not separate textUse a cell array of strings, a padded string matrix, or numeric vectorsReplace instances of using the vertical slash character (|) to define multiple strings with a cell array of strings, a padded string matrix, or numeric vectors.
Passing complex inputs to charting functions that do not support complex dataWarns or errorsReal valued input argumentsCharting functions that do not support complex data will warn or error if part of the data is ignored. Pass real valued inputs to these charting functions.
'symbol' option for FontName propertyWarnsUse TeX or LaTex markupRemove all instances of setting the FontName property to 'symbol'. Use TeX or LaTeX markup instead. See the text Interpreter property for more information.
'oblique' option for FontAngle property Uses italic insteadThe 'italic' optionReplace all instances of setting the FontAngle property to 'oblique' with 'italic'.
Using the line function with the dot value ('.') for LineStyle propertyErrorsThe ':' option for dotted linesReplace all instances of setting the LineStyle property to '.' with ':'.
DrawMode axes propertyWarnsThe SortMethod axes propertyRemove all instances of the DrawMode property. Use the SortMethod property instead.
NormalMode property for surface and patch objectsWarnsThe VertexNormalsMode or FaceNormalsMode property Remove all instances of the NormalMode property. Use the VertexNormalsMode or FaceNormalsMode property instead.
lighting phong syntaxUses gouraud lighting insteadlighting gouraudReplace all instances of lighting phong with lighting gouraud.
'phong' value for the EdgeLighting and FaceLighting properties for surface and patch objectsUses gouraud lighting instead'gouraud' option Replace all instances of setting the EdgeColor or FaceColor property to 'phong' with the 'gouraud' value instead.
Using the Children property for the axes to get the text objects for the title and axis labels Does not return these objectsTitle, XLabel, YLabel, and ZLabel axes propertiesThe text objects used for the title and axis labels are no longer children of axes. Use the Title, XLabel, YLabel, and ZLabel properties for the axes to get the text objects instead.
Passing text, image, rectangle, and annotation objects as an input argument to the legend functionErrorsNot applicableRemove all instances of passing these objects to the legend function. Text, image, rectangle, and annotation objects are not included in the legend.
neverselect, autoselect, advise, verbose and quiet inputs for the opengl functionWarnsNot applicableRemove all instances of using these inputs with the opengl function.
'zbuffer' option for the figure Renderer propertyUses OpenGL renderer insteadThe 'opengl' or 'painters' optionsReplace all instances of setting the Renderer property to 'zbuffer' with 'opengl' or 'painters'. The default renderer is 'opengl'.
ResizeFcn figure propertyStill runsSizeChangedFcn figure propertyUse of the ResizeFcn figure property is not recommended. Use the SizeChangedFcn figure property instead.
FixedColors, MinColorMap, WVisual, WVisualMode, XVisual, and XVisualMode figure propertiesErrorsNot applicableRemove all instances of figure properties that are no longer supported. Use supported figure properties.
Selected and SelectionHighlight figure propertiesNo effectNot applicableRemove all instances of the Selected and SelectionHighlight figure properties.
'fullcrosshair' option for the figure Pointer propertyWarnsNot applicableRemove all instances of setting the figure Pointer property to 'fullcrosshair'.
The root properties CommandWindowSize, Diary, DiaryFile, Echo, Format, FormatSpacing, Language, More, RecursionLimit, BeingDeleted, ButtonDownFcn, UIContextMenu, Clipping, CreateFcn, DeleteFcn, BusyAction, Interruptible, HitTest, Selected, SelectionHighlight, and VisibleErrorsNot applicableRemove all instances of root properties that are no longer supported. Use supported root properties. For a list, see Root Properties.
Specifying an output argument for the triplot functionReturns single chart line objectNot applicableSpecifying an output argument for the triplot function returns a single chart line. Remove instances of code that rely on triplot returning multiple chart lines.
Specifying a single output argument for the voronoi functionReturns a vector of two chart line objectsNot applicableSpecifying a single output argument the voronoi function returns a vector of two chart lines. Remove instances of code that rely on voronoi returning more than two chart lines.

Save and print functionality being removed or changed

FunctionalityResultUse InsteadCompatibility Considerations
pagesetupdlg functionWarnsprintpreviewReplace all instances of pagesetupdlg with printpreview.
-crossplatform and -setup options for printdlg functionWarnsNot applicableRemove all instances of using the -crossplatform and -setup options with printdlg.
Using getframe function to capture content outside of the figure windowWarnsSpecify area within figure windowSpecify an area within a figure window when using getframe function.
-dsetup print optionErrorsNot applicableRemove all instances of the -dsetup print option.
'all' option for hgsave and hgload functionsErrorsNot applicableRemove all instances of using hgsave and hgload functions with the 'all' option.
Setting the PaperSize figure property when the PaperUnits figure property is set to 'normalized'ErrorsNot applicableRemove instances of setting the PaperSize property when the PaperUnits property is set to 'normalized'.
mmat option for saveas functionErrorssavefig functionRemove all instances of using the mmat option with saveas. To save a figure to a file, use hgsave with the .fig extension.
printdmfile function and print -dmfile syntaxErrorssavefig function or the figure menuRemove all instances of printdmfile and print -dmfile. To save a figure to a file, use the hgsave function with the .fig extension, or use File > Generate Code on the figure menu instead.
-dill graphics format print optionErrors-depsc or -dsvg print options for vector graphics formatsRemove all instances of using the -dill print option. For vector graphics formats, use -depsc or -dsvg option instead.
-adobecset print optionErrorsNot applicableRemove all instances of the -adobecset print option.
The printer driver options -dbj10e, -dbj200, -dbjc600, -dbjc800, -depson, -deps9high, -depsonc, -ddnj650c, -ddjet500, -dcdjmono, -dcdjcolor, -dcdj500, -dcdj550, -ddeskjet, -dlaserjet, -dljetplus, -dljet2p, -dljet3, -dljet4, -dpxlmono, -dpaintjet, -dpjxl, -dpjetxl, -dpjxl300ErrorsNot applicableRemove all instances of using these print options. To use a particular printer, install the printer driver.
The -dps, -dpsc, -deps, and -depsc print options generate PostScript® Level 3 output instead of PostScript Level 1PostScript Level 3 outputNot applicablePostScript Level 1 output is no longer supported.

GUI Building

uitab and uitabgroup components for creating user interfaces with tabbed panels

The uitab function creates a tabbed panel in which you can group related components together with a clickable tab label. The uitabgroup function creates the container that manages user selection of uitabs.

Changes introduced with new graphics system

The new MATLAB graphics system introduces these changes to the GUI building tools:

  • All UI components behave like MATLAB objects.

  • Improvements to the stacking behavior of components for more consistent behavior.

  • Improvements to component positioning for more consistency among different components and different platforms.

See Graphics Changes in R2014b for an overview of all the major changes.

Compatibility Considerations

  • In some cases, the conditions and timing of the ResizeFcn callback execution have changed. See Why Has the Behavior of ResizeFcn Changed? for more information.

  • The front-to-back order, or stacking order, of overlapping components might display differently in some UIs. See Why Are Some Components Missing or Partially Obscured? for more information.

  • UI objects no longer support the use of handle.listener to create event listeners. See Why Does handle.listener Return an Error? for more information.

  • The layout of UI components might change if you specify units in your code. Set the Units property before the Position property to ensure that MATLAB interprets the Position property values in those units. If you specify the Units property after the Position property, MATLAB interprets the Position values in the current units and converts the values to the equivalent values in the units you specified.

  • Figure annotations and child objects of uipanels cannot cross uipanel boundaries. Previous versions of MATLAB allow annotations and child objects to extend into (or out of) the uipanel boundaries. Now, these items clip at the uipanel boundary. Annotations and child objects of uibuttongroups behave the same way when they encounter a uibuttongroup boundary.

  • The waitforbuttonpress function is now figure-specific. The figure that is current when you call the waitforbuttonpress function is the only area in which users can press a key or click a mouse button to resume program execution. If you need to support multiple open figures, then use the gcf function to determine the current figure when you call waitforbuttonpress.

Functionality being removed or changed

FunctionalityResultUse InsteadCompatibility Considerations
selectmoveresizeNo effectploteditReplace all instances of selectmoveresize with plotedit.
The Selected and SelectionHighlight properties of figure, uicontrol, uitable, uipanel, uibuttongroup, uipushtool, and uitoggletool.No effectNot applicableRemove all instances that use the Selected and SelectionHighlight properties.
See Properties and syntaxes being removed or changed for more information about all the changes to figure properties.
The ResizeFcn property of figure, uipanel, and uibuttongroup.Still runsSizeChangedFcn propertyUse of the ResizeFcn property is not recommended. Use the SizeChangedFcn property instead.
See Properties and syntaxes being removed or changed for more information about all the changes to figure properties.
The 'fullcrosshair' option for the figure Pointer propertyWarningNot applicableRemove all instances of setting the figure Pointer property to 'fullcrosshair'.
See Properties and syntaxes being removed or changed for more information about all the changes to figure properties.
The SelectionChangeFcn property of uibuttongroupStill runsSelectionChangedFcn propertyUse of the SelectionChangeFcn property is not recommended. Use the SelectionChangedFcn property instead.
The Clipping property of uicontrol, uitable, and graphics rootErrorNot applicableRemove all instances that use the Clipping property of a uicontrol, uitable, and graphics root.
See Properties and syntaxes being removed or changed for more information about all the changes to root properties.
The 'none' option for the uipanel and uibuttongroup BackgroundColor property.ErrorNot applicableRemove all instances of setting the uipanel or uibuttongroup BackgroundColor property to 'none'.

Performance and Big Data

Big data analysis on your desktop that can scale to Hadoop with mapreduce

The mapreduce function enables analysis of data sets that do not fit in your computer's memory. It is used to process large data sets on your desktop, and can also be extended to run on Hadoop® to process big data. MapReduce is a powerful technique for applying data processing methods to very large data sets, from simple statistics to complex machine learning algorithms.

For more information, including a selection of examples, see MapReduce.

The functionality of mapreduce extends beyond MATLAB with the following products:

  • Access relational databases using Database Toolbox™

  • Increased performance on desktops with Parallel Computing Toolbox

  • Scaling up to Hadoop using MATLAB Distributed Computing Server™

  • Create deployable archives or standalone applications that run against Hadoop using MATLAB Compiler™

Improved performance for sorting categorical data with sort

The performance of the sort function improves for large categorical array inputs.

typecast function performance improvements with long vectors

The performance of the typecast function improves for long input vectors.

R2014a

New Features, Bug Fixes, Compatibility Considerations

Desktop

Pop-up Command History for recalling, viewing, filtering, and searching recently used commands in the Command Window

Pop-up Command History (2 min, 41 sec)

The Command History now displays in response to the up arrow (↑) in the Command Window, by default. Previously, the Command History window occupied a designated space on the MATLAB desktop. The following are additional features enhancing the Command History.

  • Colored marks on the left side of the Command History indicate commands that generate errors. These marks are of the same color as error messages in the Command Window.

  • You can perform case-insensitive searches in the Command History, as well as search for partial matches anywhere in a command.

  • You can select multiple commands using Shift + ↑ and rerun them at once. In addition, brackets display on the left side of the Command History to indicate commands processed as a group. Select the bracket to rerun the group.

  • You can filter commands to display only the results that match your search.

  • The Command History can display the command execution time.

For more information, see Command History.

Compatibility Considerations

To view the Command History window in a docked location as in previous releases of MATLAB, click and then select Dock.

There is no longer any performance issue that justifies saving every nth command to the command history file.  Therefore, this option no longer appears in the Command History Preferences. Instead, specify the total number of commands to save. The default is 25,000 commands, but you can specify a value up to 1,000,000. For more information, see Command History Preferences.

The history file is now named History.xml. Previously, it was named history.m. The first time you access an existing history.m file, MATLAB automatically converts it to History.xml, and you do not need to take further action.

Merge option in MATLAB Comparison Tool for resolving differences between text files

When comparing text files in the MATLAB Comparison Tool you can now merge changes from one file to the other. Merging changes can be useful when resolving conflicts between different versions of files.

For details, see Comparing Text Files.

Saving workspace variables and their values to a MATLAB script

MATLAB now provides the ability to save workspace variables to a MATLAB script. Once the script is saved, you can regenerate the workspace variables by running the script. Click Save Workspace on the MATLAB desktop and select MATLAB script (*.m) in the Save as type menu. Alternately, use matlab.io.saveVariablesToScript to perform this operation from the command line.

Variables that cannot be saved to a script are saved to a MAT-file with the same name as that of the script.

Korean and Chinese localization available on Windows and Mac platforms

If the Language setting on your computer is Korean or Chinese, then MATLAB now has a localized user interface and documentation.

Korean and Chinese documentation is also available on the Web. For details, see Korean and Chinese Documentation.

MathWorks file properties displayed for .SLX, .SLXP, and .MLAPPINSTALL files in file browsers and search engines on Windows and Mac systems

Users can find and organize MathWorks files that are based on the Open Packaging Conventions format (OPC) directly through the Windows and Mac operating systems. MathWorks OPC files are files with .slx, .slxp, or .mlappinstall file extensions.

Use the Tags property to add custom searchable text to the file.

Language and Programming

Suggested corrections for mistyped, user-defined functions in the Command Window

MATLAB suggests corrections for function names mistyped in the command window. This functionality now includes suggestions for custom, or user-defined, functions on the MATLAB path.

Streamlined MEX compiler setup and improved troubleshooting

mex -setup is no longer necessary in most situations

Setting up mex compilers has been simplified. For most users, there is no longer any need to run mex -setup. mex automatically locates and uses a supported installed compiler.

mex reports selected compiler and success status

mex, by default, identifies the compiler it is using at build time and reports success. To suppress this feature, use the new -silent option. mex still reports errors and warnings, even when you specify -silent.

mex maintains different settings for C and C++

mex maintains different settings for C and C++ compilers.

Compiling for MATLAB engine applications is different

To build an engine application or a standalone application to read MAT-files, use the mex command with the new -client engine option. For more information, see What You Need to Build Engine Applications or What You Need to Build Custom Applications.

mex uses standard quoting and no escape characters

If you specify varname=varvalue parameters when you invoke mex, you no longer need to use double-quotes (") on Windows, or escape the $ character on Linux. To redefine a variable, use MATLAB-style single quotes (') and no escape characters.

mex -setup takes a language setting

mex -setup selects a compiler for a given language, lang. If lang is not specified, mex -setup searches for C compilers.

Compatibility Considerations

  • Do not use the -f option to build engine and MAT-file applications. Use the -client engine option instead.

  • The format of the mex configuration files has changed. If there is a .bat or .sh options file in the current or prefdir folder, MATLAB displays a warning. In a future release, these warnings will become errors.

  • Informational messages from mex have changed. The mex command displays the selected compiler and success status. To suppress these messages, use the -silent option.

  • The output of the mex -setup command has changed. Use mex -setup to change the default compiler for a given language. For more information, see Changing Default Compiler.

  • The mex -setup syntax has changed. You can specify a language. If none is specified, mex -setup uses C.

Multidimensional array support for flipud, fliplr, and rot90 functions

The flipud, fliplr, and rot90 functions now support arrays with any number of dimensions. These functions operate independently on the planes formed by the first and second dimensions.

Option for circshift to operate on a specified dimension

The syntax circshift(A,K,dim) allows you to shift the elements of array A by K positions along dimension dim. For more information, see the reference page for circshift.

Compatibility Considerations

The behavior of Y = circshift(A,K) for scalar K will change in a future release. Currently, the function acts on the first dimension of A by default. In a future release, the function will operate on the first dimension of A whose size does not equal 1 by default. To retain current behavior, use circshift(A,[K 0]).

Changes to empty string matching with validatestring

validatestring now validates empty strings.

V = validatestring('',{'Cantor','','Koch'})
V =

     ''
In versions of MATLAB prior to R2014a, the call to validatestring results in an error.

Compatibility Considerations

Change code that relies expects an error when testing the validity of an empty string.

matlab.lang.makeValidName and matlab.lang.makeUniqueStrings functions for constructing unique MATLAB identifiers

The matlab.lang.makeValidName function returns valid MATLAB identifiers from input strings. The output names are not guaranteed to be unique. For example,

S = {'Item#','Item#','Price/Unit','1st order','Contact'};
N = matlab.lang.makeValidName(S)
N = 

    'Item_'    'Item_'    'Price_Unit'    'x1stOrder'    'Contact'

The matlab.lang.makeUniqueStrings function returns unique strings from input strings. For example,

S = {'coffee' 'tea' 'coffee' 'water' 'coffee'};
U = matlab.lang.makeUniqueStrings(S)
U = 

    'coffee'    'tea'    'coffee_1'    'water'    'coffee_2'

Use these two new functions together to ensure that output strings are valid and unique MATLAB identifiers. For example,

S = {'Item#','Item#','Price/Unit','1st order','Contact'};
N = matlab.lang.makeValidName(S);
U = matlab.lang.makeUniqueStrings(N,{},namelengthmax)
U = 

    'Item_'    'Item__1'    'Price_Unit'    'x1stOrder'    'Contact'

details function displays details about arrays

For more information, see details.

Changes to passing empty object to isprop

Calls to isprop with empty objects now return an empty logical array instead of false.

Compatibility Considerations

Change code that relies on isprop retuning false for empty objects.

Behavior change of fullfile function output

In R2012b and earlier, the fullfile function returns a full file specification that includes repeated file separators and relative path symbols if the input file parts include them. For example, repeated file separators include \\ and \\\. Relative path symbols include the dot (.) and double-dot (..) notation.

As of R2013a, fullfile collapses inner repeated file separators and relative directories indicated by the dot and double-dot symbols, and does not display those symbols in the output full file specification. fullfile maintains repeated file separators only if they appear at the beginning of the full file specification. fullfile maintains dot and double-dot symbols only if they appear at either end of the full file specification.

For example, the commands,

f = fullfile('C:\foo\folder1', '..\folder2')
g = fullfile('C:\foo\folder1', '\\\folder3\\')
h = fullfile('\\folder4\.')
return:
f =
C:\foo\folder2

g =
C:\foo\folder1\folder3\

h =
\\folder4\. 
In R2012b and earlier, the same commands returned:
f =
C:\foo\folder1\..\folder2

g =
C:\foo\folder1\\\folder3\\

h =
\\folder4\.

Compatibility Considerations

Change code that relies on locating exact strings containing repeated file separators or dot and double-dot symbols in a full file path.

Support array-creation functions in your class

Class authors can add support to their classes for the array creation functions (ones, zeros, rand, eye, NaN, inf, true, false, cast, rand, randn, and randi). This support includes the class name and prototype object syntaxes. For more information, see Class Support for Array-Creation Functions.

Custom plugins in unit testing framework

The matlab.unittest testing framework provides an interface class, matlab.unittest.plugins.TestRunnerPlugin, to create custom plugins and extend the TestRunner. For more information, see Write Plugins to Extend TestRunner and Create Custom Plugin.

Test parameterization and selection in unit testing framework

Test authors can write tests that are parameterized to combine and execute over lists of data. For more information, see Create Basic Parameterized Test and Create Advanced Parameterized Test.

The matlab.unittest.TestSuite.selectIf method, combined with classes in the matlab.unittest.selectors package, allows for the improved selection of tests included in the test suite.

matlab.unittest plugin for Test Anything Protocol (TAP) output

The matlab.unittest testing framework provides a plugin that produces a Test Anything Protocol (TAP) stream. This plugin allows integration of MATLAB unit test results into third-party systems that recognize the Test Anything Protocol such as continuous integration systems. For more information, see the matlab.unittest.plugins.TAPPlugin documentation.

Output stream direction for matlab.unittest plugins

The matlab.unittest testing framework provides a means to redirect text output from several plugins to standard output (ToStandardOutput) or to a file (ToFile). Output stream direction is supported for the DiagnosticsValidationPlugin, FailureDiagnosticsPlugin, TAPPlugin, and TestSuiteProgressPlugin plugins.

Additionally, the OutputStream class provides an interface for test authors to create custom output streams.

Comparator for MATLAB objects in unit testing framework

The PublicPropertyComparator can be used with the IsEqualTo constraint to compare public properties of MATLAB objects recursively.

Changes to compiler support for building MEX-files

MATLAB supports Visual C++® 2013 compilers for building MEX-files on Microsoft Windows 32- and 64-bit platforms.

Compatibility Considerations

To ensure continued support for building your MEX-files, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers website.

Changes to External Programming Language Interfaces documentation

External Programming Language Interfaces documentation is divided into two new categories in Advanced Software Development.

  • Calling External Functions—How to use functionality from other languages, such as Java, .NET, and C, in MATLAB.

  • MATLAB API for Other Languages—How to interact with MATLAB and MATLAB data types from other language applications. How to write and call MEX-functions.

Functionality being removed or changed

Functionality

What Happens When You Use This Functionality?

Use This Instead

Compatibility Considerations

circshift(A,K) for scalar K.

Still runs

circshift(A,[K 0]) to retain current behavior

In a future release, the behavior of circshift(A,K), where K is a scalar, will change. The function will operate on the first array dimension whose size does not equal 1 by default. Currently, the function operates on the first array dimension by default.

To retain current behavior, use circshift(A,[K 0]).

flipdim(A,dim)

Still runs

flip

Replace all instances of flipdim(A,dim) with flip(A) or flip(A,dim).

bitmax

Warns

flintmax

Replace all instances of bitmax with flintmax.

tstool

Errors

timeseries, tscollection, openvar, or plot

Replace all instances of tstool with timeseries, tscollection, openvar, or plot.

To create a time series object, use timeseries.

To create a time series collection with one or more timeseries objects, use tscollection.

To open a time series object or collection in the Variables editor, use openvar.

To plot a time series object, use plot.

genvarname

Still runs

matlab.lang.makeValidName and matlab.lang.makeUniqueStrings

Replace all instances of genvarname with matlab.lang.makeValidName and matlab.lang.makeUniqueStrings. For example,

S = {'my.Name','my_Name','my_Name'};
N = matlab.lang.makeValidName(S);
U = matlab.lang.makeUniqueStrings(N,...
    {},namelengthmax);

depdir

Warns

matlab.codetools.requiredFilesAndProducts

Replace all instances of depdir with matlab.codetools.requiredFilesAndProducts. However, matlab.codetools.requiredFilesAndProducts returns the full path of a required file, including the file name.

depfun

Warns

matlab.codetools.requiredFilesAndProducts

Replace all instances of depfun with matlab.codetools.requiredFilesAndProducts. However, matlab.codetools.requiredFilesAndProducts does not identify opaque classes, such as Java or COM classes. There is no replacement for this functionality.

createCopy method of inputParser class

Errors

copyReplace all instances of createCopy with copy.

mex -f filepath\mexopts.bat

mex -f filepath/mexopts.sh

Warns

For building engine and MAT-file applications, use mex -client engine.

Replace custom mex options files with mex command-line options.

mexIsGlobal in the C/C++ and Fortran MEX API Library

Always returns false

mxIsFromGlobalWS in the C/C++ Matrix Library API and Fortran Matrix Library API

Replace all instances of mexIsGlobal with mxIsFromGlobalWS in MEX-files.

Mathematics

isdiag, isbanded, issymmetric, ishermitian, istril, istriu, and bandwidth functions for testing matrix structure

The following functions test various aspects of matrix structure and are useful in simplifying numerical algorithms.

  • ishermitian determines if a matrix is Hermitian or skew-Hermitian.

  • issymmetric determines if a matrix is symmetric or skew-symmetric.

  • istriu determines if a matrix is upper-triangular.

  • istril determines if a matrix is lower-triangular.

  • isdiag determines if a matrix is diagonal.

  • bandwidth returns the upper and lower bandwidth of a matrix.

  • isbanded determines if a matrix is within the specified upper and lower bandwidths.

sylvester function for solving the Sylvester equation

The sylvester function solves the Sylvester equation, AX + XB = C, for X.

Option for eig function for computing left eigenvectors

The eig function can now calculate the left eigenvectors of a matrix A explicitly.

For example:

A = magic(3);
[V,D,W] = eig(A)
V =

   -0.5774   -0.8131   -0.3416
   -0.5774    0.4714   -0.4714
   -0.5774    0.3416    0.8131


D =

   15.0000         0         0
         0    4.8990         0
         0         0   -4.8990


W =

   -0.5774   -0.7416   -0.0749
   -0.5774    0.6667   -0.6667
   -0.5774    0.0749    0.7416

This produces a full matrix, W, whose columns are the left eigenvectors of A such that W'*A = D*W'.

Option for rand, randi, and randn functions for creating arrays of random numbers that match data type of an existing variable

The functions rand, randi, and randn can now return output that matches the data type of an existing variable.

For example:

A = int16(32);
r = randi(A,4,4,'like',A);
class(r)
ans =

int16

Integer type support for mean

The mean function now supports inputs of any integer data type.

complex function with one complex input

The complex function now supports one complex input. If X is complex, then z = complex(X) is identical to X. In previous releases, complex returned an error.

Change to ind2sub and sub2ind functions with nondouble inputs

The output behavior of the ind2sub and sub2ind functions has changed. The new output of these functions always has class double regardless of the class of the input.

Compatibility Considerations

In previous releases, the output class of these functions was dependent on the input class. To obtain nondouble output, cast the output into the required class, such as int8(sub2ind(size,i,j)).

Data Import and Export

Webcam support for previewing and acquiring live images and video

Webcam Support (2 min, 54 sec)

You can use the MATLAB Webcam support to bring live images from any USB Video Class (UVC) Webcam into MATLAB. This includes Webcams that might be built into laptops or other devices, as well as Webcams that plug into your computer via a USB port.

With simple MATLAB functions you can detect your connected Webcams, acquire single snapshots from a Webcam, and optionally set up a loop of acquired images. The webcamlist function allows you to detect the connected Webcams. The webcam function creates the Webcam object that is used to acquire images. And the snapshot function returns a single image from the camera. You can also preview your image and set properties for the image.

The Webcam support is available only through the Hardware Support Packages. You must download and install the necessary files using the Support Package Installer. To open the Support Package Installer, type supportPackageInstaller in MATLAB. Then on the Select support package to install screen, select the USB Webcams from the list. For more information on installing this support package, see Installing the Webcam Support Package.

The MATLAB Webcam support can be used on the following platforms:

  • Microsoft Windows 32-bit and 64-bit

  • Mac OS X 64-bit

  • Linux

For more information about using the Webcam feature, see

Raspberry Pi hardware support for controlling devices such as motors and actuators, and for capturing live data from sensors and cameras directly from MATLAB

You can use MATLAB commands to connect to a Raspberry Pi board over a network and perform the following operations:

  • Exchange data with sensors and actuators that are connected to the GPIO, serial port, I2C, and SPI interfaces

  • Record video and take photographs using the Camera Board

  • Issue Linux shell commands

  • Transfer files to or from your host computer

  • Control the on-board LED

To install or update this support package, perform the steps described in Install Support for Raspberry Pi Hardware.

For more information, see Raspberry Pi Hardware.

readtable improvements for reading spreadsheet and text files

  • The readtable function now automatically recognizes .xlsb, .xlsm, .xltm, .xltx, and .ods as file extensions for spreadsheet files. You no longer need to specify the 'FileType','spreadsheet' name-value pair argument when reading files with these extensions.

  • The readtable function can now read from text files without a file extension. Previously, readtable searched for a file with a .txt extension.

  • On systems with Excel for Windows, the readtable function can read spreadsheet files in basic mode, using the 'Basic' name-value pair argument. Basic mode is the default for systems without Excel for Windows.

Compatibility Considerations

If you specify a file name with no extension, for example, foo, the readtable function reads foo as a text file, if it exists. If foo does not exist, then readtable searches for and reads from foo.txt. In R2013b, readtable reads only from the file named foo.txt.

To read from a file with a .txt extension when an identically named file without an extension also exists, specify both the file name and extension in the call to readtable.

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
aufinfoWarnsaudioinfoReplace all instances of aufinfo with audioinfo.
aureadWarnsaudioreadReplace all instances of auread with audioread.
auwriteWarns Write audio files using audiowrite.
wavfinfoWarnsaudioinfoReplace all instances of wavfinfo with audioinfo.
wavreadWarnsaudioreadReplace all instances of wavread with audioread.
wavwriteWarnsaudiowriteReplace all instances of wavwrite with audiowrite.
wavplayErrors audioplayer and playReplace all existing instances of wavplay with audioplayer and play.
wavrecordErrorsaudiorecorder and recordReplace all existing instances of wavrecord with audiorecorder and record.
mmreaderErrorsVideoReaderReplace all instances of mmreader with VideoReader.

GUI Building

Panel Display in GUIDE Layout Area

While designing a GUI with GUIDE, if you place a panel on top of controls, the layout remains as you specify in the layout area. However, in the running GUI, the panel displays under the controls.

Compatibility Considerations

Previously, if you placed a panel on top of controls in the layout area, the panel automatically moved under the controls in the design area and appeared under the controls in the running GUI. Now, the panel remains as you place it in the layout area, but displays under the controls in the running GUI. The best practice is to place the panel in the layout area first, and then place the controls in the panel. This way, the design area matches the appearance of the running GUI. For existing GUIs, you can right-click the panel in the design area, and then select Send to Back.

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
HitTest, Selected, and SelectionHighlight properties for these components:
  • figure

  • uicontrol

  • uipanel

  • uibuttongroup

  • uipushtool

  • uitable

  • uitoggletool

  • uitoolbar

Still runsNot applicableUse of the HitTest, Selected, and SelectionHighlight properties is not recommended for the listed components. These properties might be removed from these components in a future release.

Performance

conv2 function performance improvements with three inputs

The performance of the conv2 function improves when using the conv2(h1,h2,A) syntax.

filter function performance improvements for FIR and IIR

The performance of the filter function, filter(b,a,X), improves in the following cases:

  • where a is a scalar and X is a sufficiently long vector (FIR filter)

  • where a is a vector and X is a vector, matrix, or multidimensional array (IIR filter)

R2013b

New Features, Bug Fixes, Compatibility Considerations

Language and Programming

table data container for managing, sorting, and filtering mixed-type tabular data

table is a new data type to collect mixed-type data and metadata properties, such as variable names, row names, descriptions, and variable units, in a single container. Tables are suitable for column-oriented or tabular data that is often stored as columns in a text file or in a spreadsheet. For example, you can use a table to store experimental data, with rows representing different observations and columns representing different measured variables.

Tables consist of rows and column-oriented variables. Each variable (column) in a table can have a different data type and a different size with the restriction that each variable must have the same number of rows. For example,

T = 

                Gender    Age    Smoker     BloodPressure 
                ------    ---    ------    ---------------
    Smith       'M'       38     true      124          93
    Johnson     'M'       43     false     109          77
    Williams    'F'       38     false     125          83
    Jones       'F'       40     false     117          75
    Brown       'F'       49     false     122          80

For more information, see Tables.

categorical array for ordered and unordered categorical data

categorical is a data type to store data with values from a finite set of discrete categories. A categorical array provides efficient storage and convenient manipulation of nonnumeric data, while also maintaining meaningful names for the values. Ordinal categorical arrays are a type of categorical array whose categories have a mathematical order. For example,

myCategorical = 

     medium      large      small      small      medium 
categories(myCategorical)
ans = 

    'small'
    'medium'
    'large'

You can use categorical arrays in a table to select groups of rows. For more information, see Categorical Arrays.

timeit function for robust time estimates of function execution

The timeit function measures the time required to run a function. It provides a more robustly computed time estimate than tic/toc.

localfunctions function for getting handles to all local functions in a file

The localfunctions function returns a cell array of function handles to all local functions in the current file.

Functions for writing, executing, and verifying tests using the matlab.unittest testing framework without creating custom classes

As an alternative to writing object-oriented tests, the MATLAB xUnit-style testing framework now provides function-based writing, execution, and verification of tests. For more information, see Unit Testing Framework. For an example of function–based test writing, see Write Simple Test Case Using Functions.

matlab.mixin.CustomDisplay utility class to write custom display methods

Use the matlab.mixin.CustomDisplay class to customize object display for your MATLAB class.

flip function, a faster and more memory efficient alternative to flipdim for flipping arrays and vectors

The flip function provides a faster and more memory efficient alternative to flipdim for flipping arrays and vectors.

Partial name matching in inputParser

The inputParser now includes the PartialMatching property, which allows partial matching of parameter names. This property is true by default. For more information, see the inputParser reference page.

Compatibility Considerations

Parsing schemes requiring exact parameter name matching should set the inputParser PartialMatching property to false.

Additional validateattributes options for checking array values

The validateattributes function now checks the following additional attributes of numeric or logical input arrays.

Attribute

Description

'decreasing'

Each column element is less than the previous element and no element is NaN.

'increasing'

Each column element is greater than the previous element and no element is NaN.

'nondecreasing'

Each column element is greater than or equal to the previous element and no element is NaN.

'nonincreasing'

Each column element is less than or equal to the previous element and no element is NaN.

For more information, see the validateattributes reference page.

Conversion changes of out-of-range numbers passed to Java methods that take integers

MATLAB R2013b changes the way it converts out-of-range values for the following Java integer types:

  • Signed 32-bit integer (Java int, short or byte parameters)

  • Signed 64-bit integer (Java long parameters)

For a description of the conversion, see Converting Numbers to Integer Arguments.

Compatibility Considerations

If your MATLAB code can pass out-of-range values to Java methods with integer type arguments, the results might change. For example, the following value, val, is out-of-range for the argument to java.lang.Integer.

val = uint32(2^31);
java.lang.Integer(uint32(val))

In previous versions of MATLAB, the result is:

ans =
 
-2147483648

As of MATLAB R2013b, the result is:

ans =
 
-1

Additional properties for mex.getCompilerConfigurations function

The mex.getCompilerConfigurations function returns the following new properties:

  • ShortName — Character string used to identify options file for the compiler

  • MexOpt — Name and full path to options file

  • Priority — The priority of this compiler

Changes to compiler support for building MEX-files

MATLAB no longer supports the following compilers on Microsoft Windows platforms:

  • Intel C++ Version 11

  • Intel Visual Fortran Version 11

  • Open Watcom C/C++

Compatibility Considerations

To ensure continued support for building your MEX-files, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers website.

Changes to time alignment for time series objects

The IsTimeFirst property for time series objects is now read only. The property value is false for 3-D and higher dimensional data. Otherwise, the value is true.

  • true — The first dimension of the data array is aligned with the time vector. For example, ts = timeseries(rand(3,3),1:3);

  • false — The last dimension of the data array is aligned with the time vector. For example: ts = timeseries(rand(3,4,5),1:5);

Consequently, the alignment of the Time property with the first or last data dimension of the Data property is based on the number of dimensions of the data. When the data contains three or more dimensions, the length of the Time property matches the size of the last data dimension. Otherwise, the length of the Time property matches the size of the first data dimension.

Compatibility Considerations

You receive an error when creating a time series object with 3-D or higher dimensional data and with time alignment along the first dimension.

To preserve the property value of true for IsTimeFirst with 3-D or higher dimensional data, reshape the data array to two dimensions, such that the last data dimension and the time dimension are compatible. For example, replace timeseries(ones(10,4,2),1:10) with timeseries(ones(10,8),1:10).

To preserve the number of dimensions of a 3-D or higher dimensional data array, use permute to reorder the data array, such that the size of the last data dimension aligns with the time vector.

Furthermore, you receive a warning when loading a time series object from a prior release with 3-D or higher dimensional data and with time alignment along the first dimension. In this case, MATLAB preserves the time alignment with the first dimension and reshapes the data to 2-D.

New fixture and plugin features for matlab.unittest testing framework

The matlab.unittest testing framework now provides four customized fixtures to ease the creation of setup and teardown code. You can use these fixtures to change the current working folder, add a folder to the MATLAB path, suppress the display of warnings, and create a temporary folder. For more information, see matlab.unittest.fixtures.

To share these fixtures across test classes, use the new SharedTestFixtures class attribute of TestCase. The getSharedTestFixtures method of TestCase provides access to the shared fixtures. You also can use fixtures within a test function by calling the applyFixture method of TestCase.

To pause execution of a test and enter debug mode upon a failure or uncaught error, you can add the new plugin, StopOnFailuresPlugin to the test runner. For more information, see matlab.unittest.plugins.

Conversion of error and warning message identifiers

For R2013b, error and warning message identifiers have changed in MATLAB.

Compatibility Considerations

If you have scripts or functions that use message identifiers that changed, you must update the code to use the new identifiers. Typically, message identifiers are used to turn off specific warning messages, or in code that uses a try/catch statement and performs an action based on a specific error identifier.

For example, the MATLAB:InputParser:MustBeChar identifier has changed to display either MATLAB:InputParser:MustBeChar or MATLAB:InputParser:ParamMustBeChar. If your code checks for MATLAB:InputParser:MustBeChar, you might need to update it to check for MATLAB:InputParser:ParamMustBeChar instead. For a mapping of the new identifiers to the original identifiers, see Technical Support solution 1-ERAFNC.

Functionality being removed or changed

Functionality

What Happens When You Use This Functionality?

Use This Instead

Compatibility Considerations

addParamValue method of inputParser class

Still Runs

addParameter

Replace all instances of addParamValue with addParameter.

tstool

Warns

timeseries, tscollection, openvar, or plot

Replace all instances of tstool with timeseries, tscollection, openvar, or plot.

To create a time series object, use timeseries.

To create a time series collection with one or more timeseries objects, use tscollection.

To open a time series object or collection in the Variables editor, use openvar.

To plot a time series object, use plot.

Time series object with 3-D or higher dimensional data and time aligned with the first dimension

Errors

Time series object with 2-D data and time aligned with the first dimension or a time series object with 3-D or higher dimensional data and time aligned with the last dimension

For more information about updating your code and assessing the impact of this change, see Changes to time alignment for time series objects.

cat(0,A,B)

Errors

cat(1,A,B)

In previous releases, the cat function silently changed dim=0 to dim=1. Now, cat returns an error when dim=0. Replace all instances of cat(0,A,B) to cat(1,A,B).

cat(z,A,B), where z is a complex number

Errors

cat(real(z),A,B)

In previous releases, the cat function silently used the real part of dim. Now, cat returns an error when dim is complex. Replace all instances of cat(z,A,B) to cat(real(z),A,B).

mexIsGlobal in the C/C++ and Fortran MEX API Library

Still Runs

mxIsFromGlobalWS in the C/C++ Matrix Library and Fortran Matrix Library

Replace all instances of mexIsGlobal with mxIsFromGlobalWS in MEX-files.

Desktop

Improved viewing and editing of one-dimensional structure arrays in the Variables editor

One-dimensional (n-by-1 or 1-by-n) structure arrays in the Variables editor now display field contents arranged in columns, in a single pane. You can reorder fields by dragging a column.

The new display allows you to work with one-dimensional structure arrays as you would with other workspace variables. For example, you can edit field values in-place, create new variables from a selection, and plot selected data using the options on the Plots tab.

For more information about editing structure arrays using the Variables editor, see Edit Table and Structure Array Data Interactively

Improved management of a large number of open files, figures, and documentation pages

Files, docked figures, and documents each display in separate tabs that you can rearrange. For example, each file displays on a tab in the MATLAB Editor.

A drop-down list provides quick access to tabs that do not fit in the window when a large number of files, figures, or documents are open. When viewing multiple documents in a tiled layout, you can drag tabs to create new tiles or move documents between existing tiles. The tabs replace the document bar that was shared across tiles in earlier versions of MATLAB.

Expand all option for opening collapsed sections in documentation pages for printing and in-page searching

Some documentation pages include sections that are collapsed by default, such as input argument descriptions or examples. In-page searches do not find terms in those sections unless you first expand the sections. In R2013b, you can easily expand all sections on a page by clicking expand all in page, which is located at the top right of pages with collapsed sections. Then, you can search for terms anywhere on the page, or print the page in its entirety.

Java integration updated to version 7, providing access to new Java features and bug fixes

As of R2013b, support for the Oracle Java Runtime Environment (JRE™) has been updated to Java 7 Update 11 on all platforms.

Bundling of Java on Mac, removing dependency on Apple supplied Java runtime

The Mac version of MATLAB is no longer dependent on the Apple-provided JRE.

Enhanced print options on Mac operating systems

On Macintosh systems, the Print dialog box now provides more print options. You can access all print options provided by the native Macintosh print dialog. For example, you can select the number of pages to print per sheet, add a border or watermark, and print to a PDF file. To access the Print options, press Command+P from the Command Window or the MATLAB Editor.

Compatibility Considerations

Page Setup options, such as paper size and orientation, are no longer accessible from the Print dialog box. To access Page Setup options, select the Editor tab. In the File section, click Print and then select Page Setup. Alternatively, from the Command Window or Editor, use the keyboard shortcut, Command+Shift+P. The Page Setup dialog box opens. In the Settings menu, ensure that Page Attributes is selected.

To access the options previously available from the Page Setup dialog box (such as Layout, Header, and Fonts options), select MATLAB in the Settings menu.

Option for following documentation links to uninstalled products

By default, the Help browser displays only the documentation associated with your installed products. In previous releases, if you used this default and clicked a link to documentation in an uninstalled product, the Help system displayed a "Page Not Found" error. Now, the Help system asks if you want to view the page from the MathWorks Web site. If so, the page opens in the Help browser.

For information on changing the default settings, see Help Preferences.

Preferences dialog box improvements for easier navigation

Options in the left pane of the Preferences dialog box are arranged by product, and alphabetized within each product for simpler navigation. This change does not affect code that calls preferences. To access the Preferences dialog box, click Preferences on the Home tab.

Auto-adjust capability in Variables editor

You now can auto-adjust the column width for elements of numeric, cell, structure, and table arrays in the Variables editor. Point to the border to the right of a column heading, until a double-headed arrow appears. Then, double-click to auto-adjust the width of that column.

MATLAB support added to Windows 7 Default Programs control panel

You can manage MATLAB file associations on Microsoft Windows 7 systems using the Set your default programs option in the Default Programs control panel.

MATLAB no longer supports selective installation of individual file associations.

Japanese localization available on Mac platforms

If your Mac Language setting is Japanese, then MATLAB, Simulink®, and other localized MathWorks products now have a Japanese user interface and documentation.

Mathematics

Functionality being removed or changed

FunctionalityWhat Happens When You Use This FunctionalityUse This InsteadCompatibility Considerations

interp1(X,Y,Xq,[],...) where [] specifies the default interpolation method

Still Runs

interp1(X,Y,Xq,'linear',...)

Replace all instances of interp1(X,Y,Xq,[],...) with interp1(X,Y,Xq,'linear',...).

Passing mixed-orientation vectors to interp2:

Vq = interp2(x,y,V,xq,yq)

Specifically, if one or both of the following are true:

  • One of x and y is a row vector and the other is a column vector.

  • One of xq and yq is a row vector and the other is a column vector.

Still Runs

Construct the full grid with meshgrid first. Alternatively, use griddedInterpolant if you have a large data set.

Modify all instances that pass mixed-orientation vectors to interp2. You can modify your code in one of two ways:

  • Call meshgrid to construct the full grid first.
    [X,Y] = meshgrid(x,y);
    [Xq,Yq] = meshgrid(xq,yq);
    Vq = interp2(X,Y,V,Xq,Yq);

  • Pass the vectors to griddedInterpolant inside a cell array.
    F = griddedInterpolant({x,y},V.');
    Vq = (F({xq,yq})).'

Passing mixed-orientation vectors to interp3:

interp3(x,y,z,V,xq,yq,zq) Specifically, if one or both of the following are true:

  • x, y, and z are a combination of row and column vectors.

  • xq, yq, and zq are a combination of row and column vectors.

Still Runs

Construct the full grid with meshgrid first. Alternatively, use griddedInterpolant if you have a large data set.

Modify all instances that pass mixed-orientation vectors to interp3. You can modify your code in one of two ways:

  • Call meshgrid to construct the full grid first.
    [X,Y,Z] = meshgrid(x,y,z);
    [Xq,Yq,Zq] = meshgrid(xq,yq,zq);
    Vq = interp3(X,Y,Z,V,Xq,Yq,Zq);

  • Pass the vectors to griddedInterpolant inside a cell array.
    V = permute(V,[2 1 3]);
    F = griddedInterpolant({x,y,z},V);
    Vq = F({xq,yq,zq});
    Vq = permute(Vq,[2 1 3]);

Passing mixed-orientation vectors to interpn:

interpn(x1,x2,...,xn,V,x1q,x2q,...,xnq)

Specifically, if one or both of the following are true:

  • x1,x2,...,xn are a combination of row and column vectors.

  • x1q,x2q,...,xnq are a combination of row and column vectors.

Still Runs

Construct the full grid with ndgrid first. Alternatively, use griddedInterpolant if you have a large data set.

Modify all instances that pass mixed-orientation vectors to interpn. You can modify your code in one of two ways:

  • Call ndgrid to construct the full grid first.
    [X1,X2,...,Xn]= ndgrid(x1,x2,...,xn);
    [X1q,X2q,...,Xnq]= ndgrid(x1q,x2q,...,xnq);
    Vq= interpn(X1,X2,...,Xn, V, X1q,X2q,...,Xnq);

  • Pass the vectors to griddedInterpolant inside a cell array.
    F= griddedInterpolant({x1, x2,...,xn}, V);
    Vq= F({x1q, x2q,...,xnq});

interp1(...,'cubic')

Warns

interp1(...,'pchip')

Replace all instances of interp1(...,'cubic') with interp1(...,'pchip')

Passing the 'pp' flag to interp1. For example:

pp = interp1(x,v,'linear','pp');
vq = ppval(pp,xq);

WarnsUse griddedInterpolant to create an interpolating function that is efficient to evaluate in a repeated manner.

Replace all instances of interp1(...,'pp') with griddedInterpolant. For example:

F = griddedInterpolant(x,v,'linear');
vq = F(xq);

bitshift(A,k,N)Warns

bitshift(A,k,assumedtype)

Replace all instances of bitshift(A,k,N) with bitshift(A,k,assumedtype).
bitcmp(A,N)Warns

bitcmp(A,assumedtype)

Replace all instances of bitcmp(A,N) with bitcmp(A,assumedtype).
repmat(A,r1,r2), where r1 and r2 are row vectorsWarnsrepmat(A,[r1 r2])Replace all instances of repmat(A,r1,r2) with repmat(A,[r1 r2]).
repmat(A,empt), where empt is an empty arrayWarnsrepmat(A,1)Replace all instances of repmat(A,empt) with repmat(A,1).
repmat(A,empt1,empt2), where empt1 and empt2 are empty arraysWarnsrepmat(A,1)Replace all instances of repmat(A,empt1,empt2) with repmat(A,1).
repmat(A,n,empt), where empt is an empty arrayWarnsrepmat(A,[n 1])Replace all instances of repmat(A,n,empt) with repmat(A,[n 1]).
repmat(A,empt,n), where empt is an empty arrayErrorsrepmat(A,[n 1])Replace all instances of repmat(A,empt,n) with repmat(A,[n 1]).
repmat(A,col), where col is a column vectorErrorsrepmat(A,col.')Replace all instances of repmat(A,col) with repmat(A,col.').
repmat(A,B), where B is a matrixErrorsbvec = B(1:length(B));
repmat(A,bvec)
Replace all instances of repmat(A,B) with the following code:
bvec = B(1:length(B));
repmat(A,bvec).
repmat(A,B,C), where B and C are matricesErrorsBC = [B C];
bcvec = BC(1:length(BC));
repmat(A,bcvec)
Replace all instances of repmat(A,B,C) with the following code:
BC = [B C];
bcvec = BC(1:length(BC));
repmat(A,bcvec).
Noninteger-valued size inputs for zeros, ones, eye, Inf, NaN, true, false, rand, randi, randn, and cellErrorsInteger valued size inputsReplace all instances of noninteger-valued size inputs with integer-valued size inputs for zeros, ones, eye, Inf, NaN, true, false, rand, randi, randn, and cell. You can use floor for this conversion.
mimofrErrorsNot ApplicableRemove all instances of mimofr from your existing code.

Graphics

Mac support for copying figures in vector formats to other applications

MATLAB for Mac now supports copying figures to other applications in a high-resolution PDF format. If the figure contains uicontrols, then MATLAB uses a TIFF format instead.

savefig for saving figures to FIG-files

savefig saves one or more figures to a FIG-file.

OpenGL workarounds

If MATLAB crashes because of problems with your current version of OpenGL, then use one of the following workarounds:

  • Start MATLAB with the -softwareopengl startup flag to use the software version of OpenGL.

  • Execute the opengl neverselect command in your startup.m file to prevent MATLAB from selecting OpenGL as the renderer.

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations

Numeric specifiers to set legend location

Still runs

Supported string specifiers

Remove all instances of using numeric specifiers to set the legend location

get(0,'CommandWindowSize')

Still Runs

matlab.desktop.commandwindow.size

Replace all instances of get(0,'CommandWindowSize') with matlab.desktop.commandwindow.size. The new command is compatible with MATLAB R2013a and later releases.

printdlg('-setup',fig)WarnsUse the operating system printer management utilities to set up a new printerRemove all instances of using printdlg with the -setup option

GUI Building

Custom icons for MATLAB apps you create

You can now package a custom icon in an app that you create. When selecting an icon, click Use your own icon... .

A second dialog box opens. Click Select icon to browse for a custom icon. The dialog box also displays three icon sizes. MATLAB automatically scales your icon for use in the Install dialog, App gallery, and quick access toolbar. For more information, see Package Apps.

Performance

repmat with numeric, char, and logical types

The performance of the repmat function improves when the input array contains numeric, char, or logical values.

Linear algebra functions on computers with new AMD processors

The performance of the linear algebra functions improves on computers with AMD® processors supporting the Intel AVX instruction set.

Data Import and Export

fprintf function prints Unicode characters to the screen

The fprintf function now displays Unicode® characters on the screen. Previously, text was displayed with the user default character encoding, which is dependent on the user locale.

Compatibility Considerations

When displaying non-ASCII text on the screen, the fprintf function might return a different output value for the number of displayed bytes, compared to previous versions of MATLAB. This output value is now equal to the number of characters displayed on the screen.

There are no changes to the behavior of fprintf when writing text to a file, or when printing ASCII text to the screen.

Changes to default encoding for sendmail function

When calling the sendmail function on systems using a Japanese locale, the default character encoding is now UTF-8. Previously, the default encoding was SJIS.

Compatibility Considerations

This change affects only systems that use a Japanese locale. To use the SJIS character encoding, call:

setpref('Internet','E_mail_Charset','SJIS');

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
hdftoolWarns Read data from HDF files using hdfread or the low-level functions in the matlab.io.hdf4.sd, matlab.io.hdfeos.gd, and matlab.io.hdfeos.sw packages.

R2013a

New Features, Bug Fixes, Compatibility Considerations

Desktop

Option to add separators between controls on the quick access toolbar

You can now insert and move separators bars on the quick access toolbar. This helps to organize icons into groups. For information on how to customize and organize icons on the quick access toolbar, see Access Frequently Used Features.

Additional icon choices, auto-scaled thumbnails, and text-formatting options for customizing descriptions of MATLAB apps

When you package an app by clicking the Package App tab on the Apps tab, MATLAB opens the Package app dialog box. In the Describe your app section of the dialog box, you can:

  • Click the app icon , and then select a new icon from the display to represent your app in the Apps gallery.

  • Use formatting options when writing the app description.

    Options include: bold, italic, monospace, and hyperlinked text; bulleted and numbered lists; images.

In addition, MATLAB automatically scales the screenshot you provide when packaging. This screenshot appears in the tooltip MATLAB displays when hovering over an app icon in the App gallery. The screenshot is scaled to fit a 300 x 300 area and maintains its original aspect ratio.

For more information, see Package Apps.

Left-aligned table of contents for navigating in the Help browser and online Documentation Center

The documentation now includes a table of contents that can remain open and that does not overlap the content. View the table of contents by clicking the Contents icon on the left edge of the window.

Search term highlighting and content expansion in the Help browser

In the Help browser, search terms now appear highlighted when you view pages linked from the search results. If the search term occurs within a collapsed section on the page, the browser automatically expands the content.

For example, the reference page for the publish function includes the term bmp in collapsed content. When you search the documentation for bmp, and then select the publish reference page, the Help browser expands the relevant section on the page and highlights all occurrences of the term.

To clear highlights, press the Esc key.

Context menu items in Help and Web browsers for zooming, page navigation, and saving

Both the Help browser and the MATLAB Web browser now provide easy access to commonly used features in their context menus. Right-click within the browser to see the available options, which include zooming to change the font size, searching within a page, navigating back or forward, or saving the HTML to a file.

    Note:   These context menu items are not available on Macintosh systems.

Removal of Handle Graphics support under -nojvm startup option

When you start MATLAB with the -nojvm startup option, Handle Graphics® functionality is not supported. (The -nojvm option is available for UNIX® platforms; see background information on the matlab (UNIX) reference page.)

Some aspects of MATLAB and related products use Handle Graphics in a way that might not be obvious. This includes anything that is based on or works using figures in MATLAB. Here is a summary of the affected features:

  • Creating figures and performing plotting tasks, such as using the plot, axes, getframe, and gcf functions.

  • Printing figures and using related functions such as print, hgexport, and saveas.

  • Creating GUIs in MATLAB using GUI-building functions such as warndlg.

  • Using Simulink scopes and printing Simulink models.

If you use the -nojvm startup option and use Handle Graphics functionality, MATLAB produces an error.

Compatibility Considerations

To avoid the error, start MATLAB without the -nojvm startup option:

  • If you have been using the -nojvm startup option to work in a command line environment or because you do not use the MATLAB desktop, use the -nodesktop startup option instead.

  • If you have been using the -nojvm startup option because of memory or performance benefits, look for other ways to gain those improvements when you start MATLAB without the -nojvm option. See topics in Performance and Memory.

  • If you want to continue to use the -nojvm startup option, remove the code that is now producing the warnings.

-noFigureWindows startup option suppresses figures on Linux and Mac platforms

When you start MATLAB with the -noFigureWindows startup option, MATLAB disables the display of figure windows.

No default keyboard shortcut for overwrite mode

There is no longer a default keyboard shortcut for Overwrite mode, and OVR no longer appears at the bottom right corner of the MATLAB status bar. Previously, the Insert key by default toggled between Insert and Overwrite modes in the Command Window and in the MATLAB Editor.

Compatibility Considerations

To enable Overwrite mode, assign a keyboard shortcut to this action. On the Home tab, in the Environment section, click Preferences > Keyboard > Shortcuts. Search or scroll to find the action name, Toggle Insert/Overwrite Mode, and assign a keyboard shortcut. Use this shortcut to toggle between Insert and Overwrite modes.

Support requests using prerelease versions

If you have Internet access, you can submit a technical support request to MathWorks from MATLAB by selecting Help > Request Support. Previously, this feature was only available in the final version of each release. Beginning with R2013a, this feature is also available in the prerelease version.

Language and Programming

matlab.unittest package, an xUnit-style testing framework for the MATLAB language that allows writing and running unit tests, and analyzing test results

For information about the matlab.unittest package, see Unit Testing Framework.

strsplit and strjoin functions for splitting and joining strings

The strsplit function splits a string into a cell array of strings. The strjoin function joins strings in a cell array into a single string.

Additional validateattributes options for checking array size and shape

The validateattributes function now checks the following attributes of input arrays.

Attribute

Description

'3d'

Array with three or fewer dimensions

'ndims', N

N-dimensional array

'square'

Square matrix

'diag'

Diagonal matrix

For more information, see the validateattributes reference page.

Help text for enumerations and events

The help and doc commands now display help text that you define for enumerations and events in custom classes. For more information, see Create Help for Classes.

Removal of support for .jar documentation files

The Help system no longer extracts documentation from .jar files. All custom documentation must be in uncompressed HTML files.

For more information, see Display Custom Documentation.

Changes to Microsoft .NET Framework support

As of R2013a, the MATLAB .NET interface requires the Microsoft .NET Framework Version 4.0 and above. The interface continues to support assemblies built on Framework 2.0 and above.

Compatibility Considerations

You must have the .NET Framework Version 4.0 or above installed on your system. If you enter any NET. or System. commands on a machine without Framework 4.0, MATLAB displays a warning. To determine if your system has a supported framework, use the NET.IsNETSupported function.

Changes to compiler support for building MEX-files

MATLAB supports these new compilers for building MEX-files.

Microsoft Windows platforms:

  • Visual C++ 2012

  • Intel C++ XE 2013

  • Intel Visual Fortran XE 2013

Mac OS X platforms:

  • Apple Xcode 4.2 and higher with Clang

MATLAB no longer supports the following compiler on Mac OS X platforms:

  • Xcode with gcc

Compatibility Considerations

To ensure continued support for building your MEX-files, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers website.

Changes to subclasses of built-in classes

Subclasses of built-in classes no longer inherit the following methods:

  • ones

  • zeros

  • true

  • false

  • cast

As a result of this change, you cannot call these methods with an object of a built-in subclass. For example, given a class, mySubclassOfDouble, that derives from double, the following attempt to call cast results in an error:

a = mySubclassOfDouble(1);   % constructor 
b = a.cast('int8');          % ok in R2012b but errors in R2013a 

However, you can call the corresponding built-in functions with objects of the subclass. Use the function syntax instead of the method dot notation syntax:

b = cast(a,'int8');

Compatibility Considerations

Change code that attempts to call these methods to call the built-in function instead. Use function syntax instead of dot notation, as described in the previous section.

Conversion of error and warning message identifiers

For R2013a, error and warning message identifiers have changed in MATLAB.

Compatibility Considerations

If you have scripts or functions that use message identifiers that changed, you must update the code to use the new identifiers. Typically, message identifiers are used to turn off specific warning messages, or in code that uses a try/catch statement and performs an action based on a specific error identifier.

For example, the MATLAB:addtodate:Nargin identifier has changed to MATLAB:addtodatemx:Nargin. If your code checks for MATLAB:addtodate:Nargin, you must update it to check for MATLAB:addtodatemx:Nargin instead. For a mapping of the new identifiers to the original identifiers, see Technical Support solution 1-ERAFNC.

No strict-match requirements for month formats when converting date strings

When reading date strings, the date functions datenum, datevec, and datestr now treat months expressed as full names, three-letter abbreviations, or numbers in date string inputs interchangeably. In previous releases, the commands fail if a date string input does not match the format input. Using the datestr function to write date strings is not affected.

For example, consider the cell array of date strings, where each date string indicates the month in a different format:

mydates = {'31-October-2012','31-Oct-2012','31-10-2012'};
datevec(mydates,'dd-mm-yyyy')
ans =

        2012          10          31           0           0           0
        2012          10          31           0           0           0
        2012          10          31           0           0           0

Replacing the date string format input, 'dd-mm-yyyy', with 'dd-mmm-yyyy' or 'dd-mmmm-yyyy' returns the same output. Previously, the command failed, because the first two date strings include a full month name and a month abbreviation, which are not strict matches to the mm month format specified.

Compatibility Considerations

The date functions datenum, datevec, and datestr do not error when month formats are inconsistent across multiple date strings in a cell array of strings. When reading a cell array of date strings, you no longer can rely on using a format that includes a field for month name or abbreviation to catch date strings that specify a month number. You should ensure that all date strings in a cell array have the same format to avoid the possibility of confusing day and month numbers. For example,

mydates = {'11-Oct-2012','11-10-2012'};
datevec(mydates,'dd-mmm-yyyy')
ans =

        2012          10          11           0           0           0
        2012          10          11           0           0           0

In R2013a, both dates are silently interpreted as October 11, 2012 although you might have intended '11-10-2012' to be in month-day-year format, representing November 10, 2012.

Date functions error on out-of-range quarter values

Valid values for quarter formats are Q1 through Q4 when converting date strings using the datenum or datevec functions. Values outside this range throw an error. Previously, the date functions accepted values outside the range, such as Q5, but returned incorrect results.

Compatibility Considerations

To prevent errors when parsing quarter values, remove values outside the valid range (Q1 through Q4) from your code.

String representations of large integers using exponential notation

The num2str function converts any large floating-point number that loses precision due to hardware limitations to a string representation that uses exponential notation. Such floating-point numbers are those greater than flintmax. Previously, num2str returned a string representation in decimal notation.

This change in behavior affects only the syntax str = num2str(x). The following example compares the output of num2str in R2013a to R2012b.

R2013aR2012b
num2str(30e+25)
ans =
3e+26
num2str(30e+25)
ans =
300000000000000000000000000

Compatibility Considerations

To obtain a string representation of large integers that uses decimal notation, call int2str(x) instead of num2str(x).

Do not use classpath.txt file to modify Java static path

As of R2012b, the file classpath.txt is no longer used to add custom paths to the static Java class path. A new MathWorks product installation rewrites the static class path (found in the classpath.txt file).

Compatibility Considerations

To modify the Java class path, create javaclasspath.txt or javalibrarypath.txt files. For more information, see The Static Path and Locating Native Method Libraries.

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations

createCopy method of inputParser class

Warns

copy

Replace all instances of createCopy with copy.

hostid

Warns

 

See Solution 1–171PI on the MathWorks website for instructions on obtaining your hostid.

Mathematics

scatteredInterpolant and griddedInterpolant support for extrapolation

  • scatteredInterpolant is a new class for interpolating scattered data, and it returns extrapolated values by default when you evaluate at query points outside the convex hull.

  • griddedInterpolant now returns extrapolated values by default when you evaluate at query points outside the domain of your sample grid.

Compatibility Considerations

scatteredInterpolant supports extrapolation by default. This behavior is different from that of TriScatteredInterp, which returns NaN when you evaluate at query points outside the convex hull using the 'linear' or 'natural' methods. To preserve the TriScatteredInterp behavior, set the ExtrapolationMethod property to 'none'. See the scatteredInterpolant reference page for more information.

griddedInterpolant previously returned NaN values when you queried points outside the domain of the sample points using the 'linear', 'cubic' or 'nearest' interpolation methods. Now all interpolation methods support extrapolation by default. To preserve the old behavior, set the ExtrapolationMethod property to 'none' when the interpolation method is 'linear', 'cubic' or 'nearest'. See the griddedInterpolant reference page for more information.

Syntax for ones, zeros, and other functions for creating arrays that match attributes of an existing variable

The functions ones, zeros, eye, Inf, NaN, true, false, and cast now can return an output that matches the data type, sparsity, and complexity (real or complex) of a variable p.

For example:

p = uint8([1 2]);
X = ones(2,3,'like',p);
class(X)
ans =

uint8

Integer type support for prod, cumsum, cumprod, median, mode, and number theory functions

The following functions now support inputs of any integer data type: median, mode, prod, cumprod, cumsum, isprime, primes, factor, gcd, lcm, perms, factorial, nextpow2, and nchoosek.

flintmax function for largest consecutive integer in floating-point format

Largest consecutive integer in floating-point format. flintmax returns the largest consecutive integer in IEEE® double precision, which is 2^53. Above this value, double-precision format does not have integer precision, and not all integers can be represented exactly. flintmax('single') returns the largest consecutive integer in IEEE single precision, which is single(2^24).

Scale option for airy function

scale is an optional flag you can pass to airy to scale the resulting Airy function. See the airy reference page for more information.

scatteredInterpolant class that replaces TriScatteredInterp

TriScatteredInterp will be removed in a future release. Use the new scatteredInterpolant class instead. The scatteredInterpolant class performs interpolation on 2-D and 3-D scattered data with support for extrapolation outside the convex hull of the sample points. scatteredInterpolant also supports queries in grid vector format to conserve memory.

Compatibility Considerations

  • scatteredInterpolant supports extrapolation by default. This behavior is different from that of TriScatteredInterp, which returns NaN when you evaluate at query points outside the convex hull using the 'linear' or 'natural' methods. To preserve the TriScatteredInterp behavior, set the ExtrapolationMethod property to 'none'. See the scatteredInterpolant reference page for more information.

  • scatteredInterpolant does not accept input of type DelaunayTri. Use nearestNeighbor or pointLocation to interpolate using a specific Delaunay triangulation. See Interpolation Using a Specific Delaunay Triangulation for more information.

  • The scatteredInterpolant Points property is the array of sample point coordinates. The corresponding TriScatteredInterp property is called X. Use the Points property to refer to the sample points when you update your code.

triangulation class to replace TriRep

TriRep will be removed in a future release. Use the new triangulation class instead. The triangulation class represents 2-D and 3-D triangulations using a similar form and syntax as TriRep.

Compatibility Considerations

The property names and some method names have changed. The tables below map the current TriRep properties and methods to the triangulation replacements. Each replacement property has the same shape and holds the same values as the corresponding TriRep property. Similarly, each replacement method has the same syntax and returns the same result as the corresponding TriRep method.

Replacements for TriRep Properties

TriRep PropertyReplacement triangulation PropertyName Change
XPoints
TriangulationConnectivityList

Replacements for TriRep Methods

TriRep MethodReplacement triangulation MethodName Change
baryToCartbarycentricToCartesian
cartToBarycartesianToBarycentric
circumcenterscircumcenter
edgeAttachmentsedgeAttachments 
edgesedges 
faceNormalsfaceNormal
featureEdgesfeatureEdges 
freeBoundaryfreeBoundary 
incentersincenter
isEdgeisConnected
neighborsneighbors 
sizesize 
vertexAttachmentsvertexAttachments 

delaunayTriangulation class to replace DelaunayTri

DelaunayTri will be removed in a future release. Use the new delaunayTriangulation class instead. delaunayTriangulation represents 2-D and 3-D Delaunay triangulations using a similar form and syntax as DelaunayTri.

Compatibility Considerations

Some of the property and method names have changed. The tables below map the current DelaunayTri properties and methods to the delaunayTriangulation replacements. Each replacement property has the same shape and holds the same values as the corresponding DelaunayTri property. Similarly, each replacement method has the same syntax and returns the same result as the corresponding DelaunayTri method.

Replacements for DelaunayTri Properties

DelaunayTri PropertyReplacement delaunayTriangulation PropertyName Change
ConstraintsConstraints 
XPoints
TriangulationConnectivityList

Replacements for DelaunayTri Methods

DelaunayTri MethodReplacement delaunayTriangulation MethodName Change
convexHullconvexHull 
inOutStatusisInterior
nearestNeighbornearestNeighbor 
pointLocationpointLocation 
voronoiDiagramvoronoiDiagram 

Set functions behavior change

The behavior of unique, union, intersect, setdiff, setxor, and ismember has changed.

  • If there are repeated elements in the input arrays, the functions unique, union, intersect, setdiff, and setxor return the index to the first occurrence of the repeated elements (or rows).

  • The optional output array, locb, returned by ismember, contains the lowest absolute indices in B for elements (or rows) that are also in A.

  • All index vectors returned by unique, union, intersect, setdiff, or setxor are column vectors.

  • The shape of the output, C, from intersect, setxor, and union, when the 'rows' and 'legacy' flags are not specified, is as follows. C is column vector unless both A and B are row vectors, in which case C is a row vector.

  • The shape of the output, C, from setdiff, when the 'rows' and 'legacy' flags are not specified, is as follows. C is a row vector if A is a row vector. Otherwise, C is a column vector.

  • unique, union, intersect, setdiff, setxor, and ismember support objects.

  • The input arrays passed to union, intersect, setdiff, setxor, and ismember must be of the same class with the following exceptions:

    • Logical, char, and all numeric classes can combine with double arrays.

    • Cell arrays of strings can combine with char arrays.

  • ismember treats trailing white space in cell arrays of strings as distinct characters. For example, 'word' is different from 'word '. If the 'legacy' flag is specified, ismember ignores trailing white space and treats 'word' the same as 'word '.

Compatibility Considerations

If the changes adversely affect your code, you can specify 'legacy' to preserve the behavior from R2012b and prior releases. For example:

[C,IA,IC] = unique([9 9 1])
C =

     1     9


IA =

     3
     1


IC =

     2
     2
     1
[C2,IA2,IC2] = unique([9 9 1],'legacy')
C2 =

     1     9


IA2 =

     3     2


IC2 =

     2     2     1

Functionality being removed or changed

FunctionalityWhat Happens When You Use This FunctionalityUse This InsteadCompatibility Considerations
quadStill runsintegral

Replace all instances of quad with integral.

For example, replace q = quad('x.*cos(x)',0,1) with q = integral(@(x)x.*cos(x),0,1).

If quad uses an absolute error tolerance, tol, replace all instances of the tolerance argument with the 'AbsTol' or 'RelTol' name-value pair arguments.

For example, replace q = quad(fun,a,b,tol) with q = integral(fun,a,b,'AbsTol',tol,'RelTol',tol).

quadlStill runsintegral

Replace all instances of quadl with integral.

For example, replace q = quadl('x.*cos(x)',0,1) with q = integral(@(x)x.*cos(x),0,1).

If quadl uses an absolute error tolerance, tol, replace all instances of the tolerance argument with the 'AbsTol' or 'RelTol' name-value pair arguments.

For example, replace q = quadl(fun,a,b,tol) with q = integral(fun,a,b,'AbsTol',tol,'RelTol',tol).

quadvStill runsintegral with the 'ArrayValued',true name-value pair argumentReplace all instances of quadv with integral using the 'ArrayValued',true name-value pair argument.
dblquadStill runsintegral2

Replace all instances of dblquad with integral2.

If there are discontinuities in the interior of the region of integration, replace dblquad with integral2 using the 'method','iterated' name-value pair argument.

triplequadStill runsintegral3

Replace all instances of triplequad with integral3.

If there are discontinuities in the interior of the region of integration, replace triplequad with integral3 using the 'method','iterated' name-value pair argument.

bitmaxStill runsflintmaxReplace all instances of bitmax with flintmax.
TriRepStill runstriangulationReplace all instances of TriRep with triangulation. Most of the triangulation properties and methods are the same as those in TriRep, but there are a few exceptions. See triangulation class to replace TriRep for details.
DelaunayTriStill runsdelaunayTriangulationReplace all instances of DelaunayTri with delaunayTriangulation. Most of the delaunayTriangulation properties and methods are the same as those in DelaunayTri, but there are a few exceptions. See delaunayTriangulation class to replace DelaunayTri for details.
TriScatteredInterpStill runsscatteredInterpolant

Replace all instances of TriScatteredInterp with scatteredInterpolant. See scatteredInterpolant class that replaces TriScatteredInterp for compatibility details.

inlineStill runsAnonymous functionReplace all instances of inline with an anonymous function. See Anonymous Functions for more information. You can use symvar and func2str to convert your existing code.
rand or randn with the 'seed', 'state' or 'twister' inputs.Still runsrngFor more information about updating your code and assessing the impact of this change, see Updating Your Random Number Generator Syntax.
permute(A,order) where order contains noninteger or complex values.WarnsReal, positive integer values for orderReplace all instances of noninteger or complex valued inputs with real, positive integer values. You can use round or real for this conversion.
Noninteger valued size inputs for zeros, ones, eye, Inf, NaN, true, false, rand, randi, randn, and cellWarnsInteger valued size inputsReplace all instances of noninteger valued size inputs with integer valued size inputs for zeros, ones, eye, Inf, NaN, true, false, rand, randi, randn, and cell. You can use floor for this conversion.
cholinc(X,'inf')ErrorsNoneRemove all instances of cholinc(X,'inf') from your code.
All other syntaxes of cholinc except cholinc(X,'inf')ErrorsicholReplace these instances of cholinc with ichol.
luincErrorsiluReplace all instances of luinc with ilu.
sparse(A)
sparse(i,j,s,...)
where A and s are of type char.
Errorssparse(double(A))
sparse(i,j,double(s),...)
Convert all char inputs to double before calling sparse.
RandnAlg property of RandStream classErrorsNormalTransform property of RandStream classReplace all existing instances of RandnAlg with NormalTransform.
setDefaultStream method of RandStream classErrorssetGlobalStream method of RandStream classReplace all existing instances of RandStream.setDefaultStream with RandStream.setGlobalStream.
getDefaultStream method of RandStream classErrorsgetGlobalStream method of RandStream classReplace all existing instances of RandStream.getDefaultStream with RandStream.getGlobalStream.

Graphics

gobjects function for preallocating graphics handle array

The gobjects function creates an array of graphics handles. Use this function instead of the ones or zeros function when preallocating an array to store graphics handles.

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations

Figure DoubleBuffer property

No effect

No replacement needed

On older computer systems, was used to produced flash-free graph animations.

Use of ginput when MATLAB is started with the–noFigureWindow or –nodisplay flag

Errors

Not applicable

Do not use ginput when you start MATLAB with the –noFigureWindows or –nodisplay flags.

Use of graphics format extensions ai or ill with saveas

Warns

No replacement

Remove all instances of saveas with the ai or ill extensions.

Use of all option with hgsave or hgload

Warns

No replacement

Remove all instances of passing all to hgsave or hgload.

Use of getframe with second input argument that specifies an area not contained in figure window

Warns

No replacement

If using a second input argument with getframe, then specify an area fully contained in figure window.

Use of -dsetup option with print to display the Windows Print Setup dialog

Warns

No replacement

Remove all instances of -dsetup. For the current figure, click File > Print in the Figure window to display the Print Setup dialog.

Data Import and Export

Reading and writing indexed and grayscale AVI files with VideoReader and VideoWriter objects

The VideoReader.read method now returns an array of grayscale data when reading grayscale AVI files. The read method also reads AVI files with indexed video and a colormap using the new 'native' input argument.

The VideoWriter.writeVideo method now writes grayscale AVI files, and AVI files with indexed video and a colormap.

Compatibility Considerations

A VideoReader object created from an AVI file with indexed video and a grayscale colormap now has a VideoFormat property with the value 'Grayscale'. By default, using the  VideoReader.read method to read this object returns an m-by-n-by-1-by-F array, where m is the image frame height, n is the image frame width, and F is the number of frames read. In R2012b and earlier releases, the value of VideoFormat was 'RGB24' and read by default returned an m-by-n-by-3-by-F array.

Writing MPEG-4 H.264 files on Mac with VideoWriter object

VideoWriter now writes MPEG-4 H.264 files with the extension .mp4 or .m4v on systems with Mac OS X 10.7 or later.

Tiff object improvements for reading and writing RGB-class TIFF images

The Tiff.readRGBAImage method returns RGBA data from an entire RGB-compatible image. The Tiff.readRGBAStrip and Tiff.readRGBATile methods return RGBA data from a single strip or a single tile in an RGB-compatible image, respectively.

The JPEGColorMode property for Tiff objects controls YCbCr/RGB conversion when writing YCbCr images. For more information, see the Tiff reference page.

Importing non-ASCII encoded files with textscan function

The textscan function now reads text files with non-ASCII encodings. For a complete list of supported encoding schemes and the syntax for specifying the encoding, see the fopen reference page.

Multichannel JP2 support in imread function

By default, when reading JP2 files, the imread function now returns all image channels in the order in which they exist in the codestream. In R2012b and earlier releases, imread read up to 3 channels only.

Compatibility Considerations

The default syntax of imread no longer reorders the channels of a JP2 image where the channels are out of order. To reorder the channels, call imread with the 'V79Compatible' name-value pair argument.

Previous behavior change of xlsread function output

In R2011b and earlier, the xlsread function returned columns of empty strings, '', in the text data output, where there were leading columns of numeric data preceding text data. As of R2012a, on systems with Excel for Windows, these columns of empty strings are trimmed from the text data output.

Compatibility Considerations

This change in behavior affects file reading on systems with Excel for Windows, when calling xlsread without the 'basic' argument. For example, given a file, myfile.xls , where Sheet1 contains the following data:

1	1	1	A	A
2	2	2	B	B
3	3	3	C	C
4	4	4	D	D
5	5	5	E	E

Calling [num,txt] = xlsread('myfile.xls','Sheet1') on systems with Excel for Windows returns:

num =
     1     1     1
     2     2     2
     3     3     3
     4     4     4
     5     5     5


txt = 
    'A'    'A'
    'B'    'B'
    'C'    'C'
    'D'    'D'
    'E'    'E'

In R2011b and earlier, the command returned:

num =

     1     1     1
     2     2     2
     3     3     3
     4     4     4
     5     5     5


txt = 

    ''    ''    ''    'A'    'A'
    ''    ''    ''    'B'    'B'
    ''    ''    ''    'C'    'C'
    ''    ''    ''    'D'    'D'
    ''    ''    ''    'E'    'E'

When reading XLS files, you can use the 'basic' flag to reproduce the pre-R2012a output:

[num,txt] = xlsread('filename.xls',Sheet,'','basic');

Authentication, user name, and password inputs for urlread and urlwrite functions

The urlread and urlwrite functions accept the following optional name-value pair arguments.

AttributeValue
AuthenticationHTTP authentication mechanism. Currently, only basic authentication is supported.
UsernameUser identifier.
PasswordUser authentication string.

Additional audio and video file reading capabilities using Import Wizard and importdata function

The Import Wizard and the importdata function now import all audio file formats supported by the audioread function, including WAV, FLAC, and OGG files on all platforms, and MP3 and MPEG-4 AAC files on Windows 7 (or later), Macintosh, and Linux platforms.

The Import Wizard and the importdata function now import all video file formats supported by the VideoReader class.

sound function nonblocking

The sound function now returns immediately. In R2012b and earlier releases, sound blocked until all audio played back. 

Compatibility Considerations

To play audio with blocking, use playblocking(audioplayer(y,Fs)) instead of sound(y,Fs).

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
aufinfoStill runsaudioinfoReplace all instances of aufinfo with audioinfo.
aureadStill runsaudioreadReplace all instances of auread with audioread.
auwriteStill runs Write audio files using audiowrite.
wavfinfoStill runsaudioinfoReplace all instances of wavfinfo with audioinfo.
wavreadStill runsaudioreadReplace all instances of wavread with audioread.
wavwriteStill runsaudiowriteReplace all instances of wavwrite with audiowrite.
cdfwriteStill runs Write Common Data Format (CDF) files using the cdflib low-level functions.
hdftoolStill runs Read data from HDF files using hdfread or the low-level functions in the matlab.io.hdf4.sd, matlab.io.hdfeos.gd, and matlab.io.hdfeos.sw packages.

Performance

fft function performance improvements on computers with new Intel and AMD processors

The fft function performance improves on computers with Intel and AMD processors supporting the AVX instruction set.

permute function performance improvements for 3-D and higher dimensional arrays

The permute function performance improves for 3-D and higher dimensional arrays.

R2012b

New Features, Bug Fixes, Compatibility Considerations

Desktop

Toolstrip that replaces menus and toolbars in MATLAB Desktop

New MATLAB Desktop (5 min, 3 sec)

  • The Toolstrip contains components that were previously available in menus, toolbars, and the Start button. Tabs such as Home, Plots, Apps, Editor, and Variable, group functionality to support common tasks.

  • The Apps tab contains a gallery of apps from the MATLAB family of products. You also can install your own apps, which appear in the apps gallery.

  • The quick access toolbar contains frequently used options such as cut, copy, paste. The quick access toolbar is customizable; you can add items from tabs or from command shortcuts you create. You can also change the position of the toolbar on the Desktop.

  • The current folder toolbar enables you to control the current working directory. The location and the controls available are customizable.

  • The Search Documentation box enables you to search the documentation for functions and other topics of interest.

Apps gallery that presents apps from the MATLAB product family

The MATLAB desktop contains a gallery of apps from the MATLAB family of products. You can also install your own apps, which appear in the apps gallery.

  • To access the apps gallery, on the desktop Toolstrip, click the Apps tab, and then, on the far right of the Apps section, click the arrow .

  • To find and install apps written by others, click the Apps tab, and in the File section, click Get More Apps.

Single-file application packaging as a MATLAB App Installer file for inclusion in the apps gallery

You can package your GUI as a single installer file that contains all of the code and data needed to run your app, as well as a description of your app. Share your app with others by uploading the installer file to File Exchange or sending it as an email attachment. When your app installs, it appears alongside apps from the MathWorks family of products in the apps gallery. For more information, see Package Apps.

Redesigned Help with improved browsing, searching, and filtering

Redesigned Help (5 min, 43 sec)

Searching and navigation

The R2012b release includes a redesigned documentation system with streamlined product pages, detailed search suggestions, and enhanced filtering of search results.

Each product's documentation is now organized by categories of functionality, such as Graphics or Simulation, rather than by information type, such as Function Reference or User's Guide. Categories include links to related reference pages, examples, and conceptual topics, allowing you to browse from one to another.

Most features of the previous Help browser are available in the new browser, although some functionality has a different appearance or location. For example:

  • The table of contents for each product is collapsed by default to maximize the space available for reading topics. Expand the table of contents from any page in the Help browser by clicking the Table of Contents button, .

  • Links to alphabetical lists of reference pages, such as functions or blocks, appear at the bottom of each product page.

  • Tasks previously performed using menu items in the Help browser, such as setting preferences or viewing page locations, are now accessible via context (right-click) menus, keyboard shortcuts, or toolbar buttons.

      Note:   On Macintosh systems, there are no context menu items for Evaluate Selection or Get Page Address. You can copy selected code to the Command Window for evaluation by pressing Shift+F7. However, in this release, there is no way to identify the page address.

  • Demos are now labeled Examples, and are accessible from the top of each product page. When you select video examples, they open in your system Web browser.

  • All release notes for a product appear on the same page, allowing you to track changes across several releases from a single location.

The new Help browser is used exclusively for the documentation of MathWorks products. As a result:

  • The web command opens all pages that are not part of the documentation in the MATLAB Web browser, even when you specify the -helpbrowser option. Because this is the default behavior of the web command, the -helpbrowser option has been removed from the documentation.

  • When the doc command does not find a documentation page, but does find associated help text, it displays the text in the MATLAB Web browser rather than the Help browser.

  • Custom documentation and documentation for downloadable or third-party products displays in a separate browser. To access this browser, open the Help browser and navigate to the documentation home page. Then, at the bottom of the page, click Supplemental Software.

Font size in Help browser and Web browser

The Help browser and Web browser now allow you to zoom in and out to adjust the font size by pressing Ctrl and + or .

In-product access to online documentation

From within the product, you can access either the installed documentation or the documentation on the Web. By default, your Help preference is set to view the installed documentation. If you change the preference to view the Web documentation, then you can choose to view documentation for products that you do not have installed.

Searches using the doc command

In previous releases, if you passed a term to the doc command that did not correspond to the name of a MathWorks reference page or to a file with help text, the doc command issued an error. Now, the doc command searches the documentation for the term, and displays the search results in the Help browser.

Improved rendering in Help browser and Web browser

The new Help browser uses a different rendering engine than the previous Help browser. This engine provides improved legibility, particularly on Microsoft Windows 64-bit systems.

The MATLAB Web browser also uses this rendering engine on all platforms. In previous releases, the Web browser used this engine only on Microsoft Windows systems.

This rendering engine is not fully supported on Red Hat® 5 operating systems, so not all Help features are available on those systems. For example:

  • Search suggestions are available from the search bar in the desktop, but not within the Help browser.

  • Some components of the search results page are not available, such as filtering.

  • The Help browser can display installed product documentation, but not the documentation on the Web.

Compatibility Considerations

  • The Help system now requires that custom documentation files reside outside the matlabroot folder (but on the MATLAB search path). To view any installed custom documentation, open the Help browser and navigate to the documentation home page. Then, at the bottom of the page, click Supplemental Software.

  • The demo command no longer supports categories of MATLAB or Simulink examples.

  • For some products (primarily third-party toolboxes), the demo command requires different input values to specify the product type or name. The demo command now identifies each product using its info.xml file rather than its demos.xml file. For most MathWorks products, the product information is the same in both files.

  • In a future release, MathWorks will remove support for demos.m files, an old way to include demos in the Help browser. For the recommended method, see Display Custom Examples.

Viewing of multiple documentation pages simultaneously with tabbed browsing

The Help browser now allows you to open multiple tabs so that you can view more than one documentation topic at a time. Open a new tab by clicking the New Tab button, , or by right-clicking a link.

Suggested corrections for mistyped functions and variables in the Command Window

MATLAB can show suggestions in the Command Window for misspelled functions and variable names. If you enter an undefined function or variable name, MATLAB displays:

Did you mean:

followed by a suggested command at the command line. You can press Enter to execute that command, or Esc to delete the suggestion.

Full-screen view mode on Mac operating systems

MATLAB can operate in full-screen mode on Mac OS X 10.7 Lion.

Changes to -nojvm startup option on Mac

When you start MATLAB on a Mac with the -nojvm startup option, Handle Graphics functionality is no longer supported. MATLAB will produce an error. Previous to this release, calls to Handle Graphics functionality would work but generate a warning. (For more information about the -nojvm option, see the matlab (UNIX) reference page.)

Tabs in MATLAB Web browser

The MATLAB Web browser now allows you to open multiple tabs so that you can view multiple reports or Web sites simultaneously. Open a new tab by clicking the New Tab button, .

Direct access to run configurations from the Run button

Now you can type commands directly using the Run options on the Editor tab.

In previous versions, you accessed run configurations by clicking the Run button down arrow and selecting Edit Run Configurations for filename.

Compatibility Considerations

MATLAB R2012b does not automatically copy run configurations from versions prior to R2012b. To transfer run configurations from a release prior to the MATLAB R2012b installation:

  1. Open prefdir\run_configurations.m. To identify your preference directory, type prefdir in the Command Window.

    Run configuration entries appear similar to this example:

    %% @name foo
    %  @associatedFile C:\Documents\MATLAB\work\foo.m
    %  @mostRecentlyActioned true
    %  @uniqueId 695644b0:1355f0bb372:-7fb0
    
    % Modify expression to add input arguments.
    % Example:
    %   a = [1 2 3; 4 5 6]; 
    %   foo(a);
    foo(1,2)

  2. Copy the MATLAB command in the run configuration. In the example configuration, the command is foo(1,2).

  3. Open the MATLAB file associated with the run configuration that you want to keep. In the example configuration, the file is C:\Documents\MATLAB\work\foo.m.

  4. Click and then the field containing type code to run.

  5. Paste the MATLAB command.

If the MATLAB expression spans multiple lines, create a script, and copy and paste the code into the script. You can then run the script directly using .

Multiple vector creation from single selection in Variables editor

The Variables editor now allows you to create one or more new row or column vectors from a single selection within an existing variable. The names of the new variables are based on the name of the existing variable. Previously, the Variables editor could only create a new array from a single selection, and new variables were called unnamed, unnamed1, …, unnamedN.

Language and Programming

Abstract attribute for declaring MATLAB classes as abstract

Declare MATLAB classes as abstract by setting the class Abstract attribute. See Defining Abstract Classes for more information.

Diagnostic message improvements when attempting to create an instance of an abstract class

Attempting to instantiate an abstract class returns a list of abstract members and their defining classes in the error diagnostic message. The meta.abstractDetails function finds abstract members defined or inherited by abstract classes.

Handle and dynamicprops do not support the empty static method

For R2012b, the handle and dynamicprops classes no longer support the empty static method. This change makes these classes consistent with all MATLAB abstract classes.

Compatibility Considerations

MATLAB software issues an error for calls to the empty static method from the handle and dynamicprops classes:

% Will return errors
handle.empty
dynamicprops.empty

See Creating Empty Arrays for information on using empty.

Switch uses eq to compare enumerations

Switch statements use the enumeration eq method to compare the switch expression with the case expression (see switch). In previous releases, switch used a special comparison that required the result of both expressions to belong to the same enumeration class. The result of the comparison is determined by the result of:

switch_experssion == case_expression

The new behavior is consistent with that of other conditional statements, such as if statements.

Compatibility Considerations

Code that uses enumerations in switch statements can behave differently in release R2012b than in a previous release.

Cannot specify property attributes multiple times

Classes can define a property attribute only once in a properties block. Defining the same attribute more than once in a properties block causes an error when the class is instantiated.

Compatibility Considerations

Classes that define the same property attribute multiple times in a properties block will error when attempting to instantiate the class. Previously, MATLAB evaluated property attribute specifications in right to left order.

Discontinued compiler support for building MEX-files

MATLAB no longer supports the following compilers on Linux 32-bit platforms:

  • GNU gcc Version 4.4.x

  • GNU gfortran 4.3.x

Compatibility Considerations

To ensure continued support for building your MEX-files, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers website.

Jagged array support for .NET

MATLAB does not support:

Java exceptions accessible to MATLAB code

If you call a Java method from MATLAB, and that code throws an exception, use the matlab.exception.JavaException class to handle the exception in MATLAB.

Ability to add jar files to static Java class path

To use third-party Java libraries in MATLAB, you can control the Java class path and native library path by creating javaclasspath.txt and javalibrarypath.txt files. For more information, see The Static Path and Locating Native Method Libraries.

Preservation of string functions for backwards compatibility

The R2010a Release Notes originally stated that the isstr, setstr, str2mat, strread, strvcat, and textread functions would be removed in a future release. As of R2012b, there are no plans to remove these functions. However, use of these functions is not recommended.

FunctionRecommended Modification
isstrReplace all existing instances of isstr with ischar.
setstrReplace all existing instances of setstr with char.
str2matReplace all existing instances of str2mat with char.
strreadReplace all existing instances of strread with textscan. For example, replace
[a,b,c] = strread(...) with
C = textscan(...)
[a,b,c] = deal(C{:})
Unlike strread, the textscan function converts numeric values to the specified data type, allowing preservation of integer types.
strvcatReplace all existing instances of strvcat with char. Unlike strvcat, the char function does not ignore empty strings.
textreadReplace all existing instances of textread with textscan, similar to strread. Open and close files with fopen and fclose.

Conversion of Error and Warning Message Identifiers

For R2012b, error and warning message identifiers have changed in MATLAB.

Compatibility Considerations

If you have scripts or functions that use message identifiers that changed, you must update the code to use the new identifiers. Typically, message identifiers are used to turn off specific warning messages, or in code that uses a try/catch statement and performs an action based on a specific error identifier.

For example, the MATLAB:uitable:InvalidParent identifier has changed to MATLAB:uitable:ParentMustBeFigureOrUIContainer. If your code checks for MATLAB:uitable:InvalidParent, you must update it to check for MATLAB:uitable:ParentMustBeFigureOrUIContainer instead. For a mapping of the new identifiers to the original identifiers, see Technical Support solution 1-ERAFNC.

Mathematics

Performance improvements and multithreading for airy, psi, and Bessel functions

The following functions show improved performance: besselh, besseli, besselj, besselk, bessely, airy, and psi.

ddensd function that solves delay differential equations of neutral type with state-dependent delays

The ddensd function solves neutral delay differential equations that involve both the solution and its first derivative evaluated in the past:

y '(t) = f(t, y(t), y(dy1),...,y(dyj), y '(dyp1),...,y '(dypk))

The delays, dy and dyp, can be time-dependent, state-dependent, or both.

Signed integer support for bit-wise operations

The bitand, bitor, bitxor, bitcmp, bitshift, bitget, and bitset, functions now support signed integers.

An additional input argument, assumedtype, is an optional string argument you can pass to any of these functions. Use assumedtype to indicate the assumed integer class for input values of type double. For example, bitor(14,240,'uint8') treats 14 and 240 as unsigned 8-bit integers even though they are passed as integers of type double.

assumedtype can be one of the following strings: 'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', or 'uint64'. The default value of assumedtype is 'uint64' for input values of type double. If the input values belong to an integer class, assumedtype defaults to the class of the input values.

atan2d function that calculates four-quadrant inverse tangent with result in degrees

atan2d calculates the four-quadrant inverse tangent and returns angles in degrees that lie in the closed interval [–180,180].

Complex number support for trigonometry degree functions

The sind, cosd, tand, asind, acosd, atand, cscd, cotd, secd, acscd, asecd, and acotd functions now support complex values. For example, sind(10+i) returns 0.1737 + 0.0172i. Likewise, asind(2) now returns the complex angle 90.0000 -75.4561i.

Functionality being removed or changed

FunctionalityWhat Happens When You Use This FunctionalityUse This InsteadCompatibility Considerations
bitshift(A,k,N)Still Runsbitshift(A,k,assumedtype)Replace all instances of bitshift(A,k,N) with bitshift(A,k,assumedtype).
bitcmp(A,N)Still Runsbitcmp(A,assumedtype)Replace all instances of bitcmp(A,N) with bitcmp(A,assumedtype).
bitshift(A,k) where A is of typedouble.Still runsNot Applicablebitshift now interprets double input as uint64 instead of 53-bit signed integer by default. For example, bitshift(1,54) now returns 1.8014e+16 instead of 0.
mimofrWarnsNot ApplicableRemove all instances of mimofr from your existing code.
Second output argument for besselh, besseli, besselj, besselk, bessely, and airy. For example, [J,ierr] = besselj(nu,Z).ErrorsSyntax that returns only the solution vector. For example, J = besselj(nu,Z).Replace all instances that return two output arguments with the syntax that returns only the solution vector.
Passing mixed-orientation input vectors to besselh, besseli, besselj, besselk, and bessely. For example, passing a row vector followed by a column vector:
J= besselj(rowNu, colZ)
or passing a column vector followed by a row vector:
J= besselj(colNu, rowZ)
Errors

First construct the inputs with ndgrid or meshgrid. Alternatively, you can pass a function handle and the mixed-orientation vectors to bsxfun.

Modify all instances that pass mixed-orientation vectors. You can modify your code in one of two ways:
  • Call meshgrid or ndgrid to construct the full grid first.

    [nu,Z]= meshgrid(rowNu, ColZ);
    J= besselj(nu, Z);

  • Pass a function handle and the mixed-orientation vectors to bsxfun. For example, if your existing code passes a row vector followed by a column vector, make the following change:

    J= bsxfun(@besselj, rowNu, colZ);or, if your code passes a column vector followed by a row vector, make the following change:

    J= bsxfun(@besselj, colNu', rowZ.');

Y = psi(k0:k1,X)ErrorsY = psi(k,X) where k is a scalar specifying the kth derivative of ψ at the elements of X.Replace all instances of Y = psi(k0:k1,X) with Y = psi(k,X), where k is a scalar. To modify your code, loop through the values k0:k1. For example:
for k=k0:k1
	Y(:,k) = psi(k,X);
end
In the future, size(Y) will be size(X). Modify any code that depends on size(Y).
Passing empty and nonscalar input to besselh, besseli, besselj, besselk, bessely, and airy. For example,
J = besselj([],(1:3))
or
J = besselj((1:3),[])
ErrorsJ = besselj(nu,[]) or J = besselj([],Z) where nu and Z are scalars.Modify all instances that pass combinations of empty arrays with nonscalar input. The inputs must be the same size or one must be a scalar.

Data Import and Export

Data import from delimited and fixed-width text files using Import Tool

The Import Tool now allows you to preview data in delimited and fixed-width text files and select ranges of data to import. You also can define rules for handling nonnumeric values, and import data as column vectors, a matrix, a cell array, or a dataset array, in a single step. This tool opens instead of the Import Wizard for text files.

For more information, watch this video.

Single-step import of numbers, text, and dates as column vectors from a spreadsheet with Import Tool

The Import Tool now allows you to import columns of numeric data, text, and dates from spreadsheets as multiple column vectors in one step. Previously, this functionality was available for numeric data only.

audioread and audioinfo functions for reading MP3, MPEG-4 AAC, WAVE, and other audio files

The audioread and audioinfo functions read and provide information about MP3, MPEG-4 AAC, WAVE, OGG, and FLAC files on all platforms.

audioread is a drop-in replacement for the most common forms of wavread and auread. In most cases where you use wavread or auread, you can rename instances of these functions to audioread.

audiowrite function for writing MPEG-4 AAC, WAVE, and other audio files

The audiowrite function writes data to WAVE, OGG, and FLAC files on all platforms. audiowrite writes data to MPEG-4 AAC files on Windows and Mac platforms.

audiowrite is a drop-in replacement for the most common forms of wavwrite. In most cases where you use wavwrite, you can rename instances of this function to audiowrite.

Reading and writing of BigTIFF image files larger than 4 GB

MATLAB now supports BigTIFF image files larger than 4 GB. You can use imread or the Tiff object.

Reading of XLSM, XLTX, and XLTM files on all platforms with xlsread function

The xlsread function now reads data from XLSM, XLTX, and XLTM files on all platforms. Previously, this functionality was available only on Microsoft Windows systems with Excel software.

xlsread function now supporting named ranges on all platforms

The xlsread function now supports named ranges as inputs, on all platforms. For example, you can call

num = xlsread(filename,sheet,xlRange);

where xlRange refers to a named range of data in your Excel workbook. Previously, this functionality was available only on Microsoft Windows systems with Excel software.

Multiple delimiter support in textscan function

The textscan function recognizes multiple different delimiters within a single file. textscan also can treat multiple repeated delimiter characters as a single delimiter.

Timeout, user agent, and character encoding inputs for urlread and urlwrite functions

The urlread and urlwrite functions accept the following optional attribute-value pair arguments.

AttributeValue
TimeoutTimeout duration
UserAgentClient user agent identification
CharsetCharacter encoding, determined from the headers of the file

For example, to download Web content from a the MATLAB Central File Exchange while specifying a timeout duration of 5 seconds, type

urlread(‘http://www.mathworks.com/matlabcentral/fileexchange','Timeout',5);

Functionality being removed or changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
avifileWarnsVideoWriterReplace all instances of avifile with VideoWriter.
wavplayWarns audioplayer and playReplace all existing instances of wavplay with audioplayer and play.
wavrecordWarnsaudiorecorder and recordReplace all existing instances of wavrecord with audiorecorder and record.
wk1finfoErrors Remove all instances of wk1finfo. Get information about Excel spreadsheets with xlsfinfo.
wk1readErrors Remove all instances of wk1read. Read Excel spreadsheets with xlsread.
wk1writeErrors Remove all instances of wk1write. Write to Excel spreadsheets with xlswrite.


View release notes for older releases

Compatibility Summary

ReleaseFeatures or Changes with Compatibility Considerations
R2015b
R2015a
R2014b
R2014a
R2013b
R2013a
R2012b
Was this topic helpful?