# Documentation

### This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

# MATLAB Release Notes Prior to R2014a

## 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```

#### `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?

Compatibility Considerations

`addParamValue` method of `inputParser` class

Still Runs

`addParameter`

Replace all instances of `addParamValue` with `addParameter`.

`tstool`

Warns

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

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 vectorsWarns`repmat(A,[r1 r2])`Replace all instances of `repmat(A,r1,r2)` with ```repmat(A,[r1 r2])```.
`repmat(A,empt)`, where `empt` is an empty arrayWarns`repmat(A,1)`Replace all instances of `repmat(A,empt)` with `repmat(A,1)`.
`repmat(A,empt1,empt2)`, where `empt1` and `empt2` are empty arraysWarns`repmat(A,1)`Replace all instances of `repmat(A,empt1,empt2)` with `repmat(A,1)`.
`repmat(A,n,empt)`, where `empt` is an empty arrayWarns`repmat(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 arrayErrors`repmat(A,[n 1])`Replace all instances of `repmat(A,empt,n)` with ```repmat(A,[n 1])```.
`repmat(A,col)`, where `col` is a column vectorErrors`repmat(A,col.')`Replace all instances of `repmat(A,col)` with `repmat(A,col.')`.
`repmat(A,B)`, where `B` is a matrixErrors`bvec = 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 matricesErrors`BC = [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 `cell`ErrorsInteger 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.
`mimofr`ErrorsNot 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
`hdftool`Warns 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

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.

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`.

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.

#### 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```

#### `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
`X``Points`
`Triangulation``ConnectivityList`

Replacements for TriRep Methods

TriRep MethodReplacement triangulation MethodName Change
`baryToCart``barycentricToCartesian`
`cartToBary``cartesianToBarycentric`
`circumcenters``circumcenter`
`edgeAttachments``edgeAttachments`
`edges``edges`
`faceNormals``faceNormal`
`featureEdges``featureEdges`
`freeBoundary``freeBoundary`
`incenters``incenter`
`isEdge``isConnected`
`neighbors``neighbors`
`size``size`
`vertexAttachments``vertexAttachments`

#### `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
`Constraints``Constraints`
`X``Points`
`Triangulation``ConnectivityList`

Replacements for DelaunayTri Methods

DelaunayTri MethodReplacement delaunayTriangulation MethodName Change
`convexHull``convexHull`
`inOutStatus``isInterior`
`nearestNeighbor``nearestNeighbor`
`pointLocation``pointLocation`
`voronoiDiagram``voronoiDiagram`

#### Set functions behavior change

• 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
`quad`Still runs`integral`

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)```.

`quadl`Still runs`integral`

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)```.

`quadv`Still runs`integral` with the `'ArrayValued',true` name-value pair argumentReplace all instances of `quadv` with `integral` using the `'ArrayValued',true` name-value pair argument.
`dblquad`Still runs`integral2`

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.

`triplequad`Still runs`integral3`

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.

`bitmax`Still runs`flintmax`Replace all instances of `bitmax` with `flintmax`.
`TriRep`Still runs`triangulation`Replace 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.
`DelaunayTri`Still runs`delaunayTriangulation`Replace 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.
`TriScatteredInterp`Still runs`scatteredInterpolant`

Replace all instances of `TriScatteredInterp` with `scatteredInterpolant`. See `scatteredInterpolant` class that replaces `TriScatteredInterp` for compatibility details.

`inline`Still 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 runs`rng`For 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 `order`Replace 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 `cell`WarnsInteger 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')`Errors`ichol`Replace these instances of `cholinc` with `ichol`.
`luinc`Errors`ilu`Replace all instances of `luinc` with `ilu`.
`sparse(A)`
`sparse(i,j,s,...)`
where `A` and `s` are of type `char`.
Errors`sparse(double(A))`
`sparse(i,j,double(s),...)`
Convert all `char` inputs to `double` before calling `sparse`.
`RandnAlg` property of `RandStream` classErrors`NormalTransform` property of `RandStream` classReplace all existing instances of `RandnAlg` with `NormalTransform`.
`setDefaultStream` method of `RandStream` classErrors`setGlobalStream` method of `RandStream` classReplace all existing instances of `RandStream.setDefaultStream` with `RandStream.setGlobalStream`.
`getDefaultStream` method of `RandStream` classErrors`getGlobalStream` 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
`Authentication`HTTP authentication mechanism. Currently, only basic authentication is supported.
`Username`User identifier.
`Password`User 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
`aufinfo`Still runs`audioinfo`Replace all instances of `aufinfo` with `audioinfo`.
`auread`Still runs`audioread`Replace all instances of `auread` with `audioread`.
`auwrite`Still runs Write audio files using `audiowrite`.
`wavfinfo`Still runs`audioinfo`Replace all instances of `wavfinfo` with `audioinfo`.
`wavread`Still runs`audioread`Replace all instances of `wavread` with `audioread`.
`wavwrite`Still runs`audiowrite`Replace all instances of `wavwrite` with `audiowrite`.
`cdfwrite`Still runs Write Common Data Format (CDF) files using the `cdflib` low-level functions.
`hdftool`Still 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)

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:

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

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, .

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_expression == 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
`isstr`Replace all existing instances of `isstr` with `ischar`.
`setstr`Replace all existing instances of `setstr` with `char`.
`str2mat`Replace all existing instances of `str2mat` with `char`.
`strread`Replace 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.
`strvcat`Replace all existing instances of `strvcat` with `char`. Unlike `strvcat`, the `char` function does not ignore empty strings.
`textread`Replace 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

#### `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

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 Runs`bitshift(A,k,assumedtype)`Replace all instances of `bitshift(A,k,N)` with `bitshift(A,k,assumedtype)`.
`bitcmp(A,N)`Still Runs`bitcmp(A,assumedtype)`Replace all instances of `bitcmp(A,N)` with `bitcmp(A,assumedtype)`.
`bitshift(A,k)` where A is of type`double`.Still runsNot Applicable`bitshift` 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`.
`mimofr`WarnsNot 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)`Errors`Y = psi(k,X)` where `k` is a scalar specifying the `k`th 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),[])`
Errors`J = 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.

#### 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
`Timeout`Timeout duration
`UserAgent`Client user agent identification
`Charset`Character 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
`avifile`Warns`VideoWriter`Replace all instances of `avifile` with `VideoWriter`.
`wavplay`Warns `audioplayer` and `play`Replace all existing instances of `wavplay` with `audioplayer` and `play`.
`wavrecord`Warns`audiorecorder` and `record`Replace all existing instances of `wavrecord` with `audiorecorder` and `record`.
`wk1finfo`Errors Remove all instances of `wk1finfo`. Get information about Excel spreadsheets with `xlsfinfo`.
`wk1read`Errors Remove all instances of `wk1read`. Read Excel spreadsheets with `xlsread`.
`wk1write`Errors Remove all instances of `wk1write`. Write to Excel spreadsheets with `xlswrite`.

## R2012a

New Features, Bug Fixes, Compatibility Considerations

### Desktop Tools and Development Environment

#### Transpose and Sort Variables in the Variable Editor

To transpose or sort variables, use the right-click menu options in the Variable Editor. You can sort variables based on single or multiple column selections. The columns you select can be noncontiguous and should always include all the rows. Also, you can create variables from noncontiguous data selections. For more information see the New Variable Editor Features in Release 2012a demo.

#### MATLAB Dock Menu on Mac Includes New Capabilities

Previously, on a Mac, the Dock menu associated with the MATLAB icon included only the default options, such as Hide/Show and Quit. Now, consistent with the behavior of most Mac applications, the MATLAB Dock menu lists open windows and documents associated with the running MATLAB application. By choosing on any of the entries in the Dock menu, you can bring that window or document to the front. To view the Dock menu, right-click the MATLAB icon in the Dock or Ctrl+click the icon, if you have a one-button mouse.

In addition, the MATLAB Dock menu includes a new option, named Open Additional Instance of MATLAB, that is a convenient way to start another instance of MATLAB running on your computer.

The following figure shows the MATLAB Dock menu with a document open in the MATLAB Editor.

#### Improved Rendering in MATLAB Web Browser

The MATLAB Web browser uses a new HTML rendering engine on Microsoft Windows systems. This new engine provides better rendering, particularly on 64-bit systems. This update impacts the display of HTML from these sources:

• `web` commands

• Published MATLAB file output

• Folder reports from the Current Folder browser

#### Technical Support Requests Use Proxy Settings

You can submit Technical Support requests from MATLAB by selecting Help > Submit a MathWorks Support Request. In previous releases, if you were connected to the Internet via a proxy server, you had to save the request form to a text file, and then email it to MathWorks. Starting with R2012a, you can submit the request directly from the form.

#### Published Code Can Display Syntax Highlighted Sample Code

When you publish MATLAB code, you can have sample code appear with syntax highlighting. Sample code is code that appears within comments. Previously, only uncommented code appeared with syntax highlighting.

#### Compatibility Considerations

Previously, to publish preformatted text (without syntax highlighting), MATLAB required two or more spaces between the comment character (%) and the first text character in a code cell comment block. Now, to publish such text, there must be two, four, or more spaces in that location. Three spaces results in syntax highlighted sample code.

#### The `publish` Function Accepts Name-Value Pairs

You can customize the output from the `publish` function using Name-Value pair arguments. Previously, to customize the output from this function, you had to use a structure. You now can use either a structure or Name-Value pair arguments. For details, see `publish`.

### Displaying Non-7-Bit ASCII Characters on Mac OS X Platforms

On Apple Mac OS X platforms, you might see garbled text if you try to use non-7-bit ASCII characters. For example, if you create a variable in the MATLAB command window containing these characters, you can type the characters, but if you display the contents of the variable, the characters are corrupted.

Or if you share MATLAB text files with a user on a computer with different locale settings, they might see corrupted text. The characters are rendered in that user's locale, not the language it was written in.

MATLAB text files include scripts and user-defined functions and classes. MATLAB displays characters in a text file using an encoding scheme, which is defined in the MathWorks locale database. This encoding scheme supports characters for the language specified by the user locale setting. If you try to use non-7-bit ASCII characters in a text file, you might have to use a different encoding scheme. UTF-8 is often used to handle multilingual characters. Beginning in R2011b, to handle non-7-bit ASCII characters, you can change the default encoding scheme to UTF-8 by switching the MathWorks locale database. Note that changing the default encoding scheme might cause characters other than 7-bit ASCII characters in existing text files to be garbled.

#### How to Change MATLAB's Default Encoding to UTF-8

If you have text files containing non-7-bit ASCII characters, you must convert the encoding in the files before changing the default encoding on your computer. For instructions, see How to Convert Text File Encoding to UTF-8.

You can change the default encoding scheme on Mac OS X platforms by using the UTF-8 locale database found in the `matlabroot``/bin` folder.

To change the default locale database, type:

```mldir = fullfile(matlabroot,'bin'); copyfile(fullfile(mldir,'lcdata.xml'),... fullfile(mldir,'lcdata_default.xml')); copyfile(fullfile(mldir,'lcdata_utf8.xml'),... fullfile(mldir,'lcdata.xml')); ```

Alternatively, you can change the default locale database by setting an environment variable on your computer.

1. Set the environment variable, `MWLOCALE_LCDATA_FILENAME`, with the UTF-8 version of the locale database name, `lcdata_utf8.xml`, in the environment file, `environment.plist`. Please see this article from the Mac OS X Developer Library, Technical Q&A QA1067 "Setting environment variables for user processes" at `http://developer.apple.com/library/mac/#qa/qa1067/_index.html`.

2. Close MATLAB if it is currently running.

3. Start MATLAB by double-clicking the MATLAB icon in the Applications folder.

#### How to Convert Text File Encoding to UTF-8

Before converting a file, copy the file to a new directory.

Use the Mac OS X TextEdit application to convert the file encoding. For example:

1. Open a MATLAB text file with TextEdit.

2. Select File -> Save as...

3. Change the file name.

4. Change Plain Text Encoding: to ```Unicode (UTF-8)```.

5. Save the file.

Alternatively, the following MATLAB function, `convert_file_encoding`, creates a new text file with different encoding.

```function convert_file_encoding(infile,outfile,from_encoding,to_encoding) if strcmp(infile(end-2:end),'mdl'); isMDL = 1; else isMDL = 0; end fpIn = fopen(infile,'r','n',from_encoding); fpOut = fopen(outfile,'w','n',to_encoding); while feof(fpIn) == 0 lineIn = fgets(fpIn); if isMDL && strncmp('SavedCharacterEncoding',strtrim(lineIn),22) lineIn = regexprep(lineIn,from_encoding,to_encoding); end fwrite(fpOut,lineIn,'char'); end fclose(fpIn); fclose(fpOut); end```

To use this function, you need to know the current encoding, `from_encoding`.

• For MATLAB R2010b or later:

```ret = feature('locale'); from_encoding = ret.encoding; ```
• For MATLAB R2008a through R2010a:

```ret = feature('locale'); [t,r] = strtok(ret.ctype,'.'); from_encoding = r(2:end); ```

For example, a file, `myFile.m`, was created with MATLAB encoding set to `ISO-8859-1`. To convert the file to `UTF-8`, type:

`convert_file_encoding('myFile.m','myFileUTF8.m','ISO-8859-1','UTF-8')`

#### Compatibility Considerations

In a future release, the UTF-8 version of the MathWorks locale database will be the default on Mac OS X systems. Any text file created in MATLAB that is encoded in the user default encoding and contains characters other than 7-bit ASCII characters must be converted to the UTF-8 encoding scheme. Otherwise, MATLAB and other MathWorks products might not be able to properly load the files.

You must convert the file encoding before changing the default locale database.

Do not convert text files to UTF-8 if you share them with users on Windows platforms.

### Mathematics

#### New Integral Functions

The new functions, `integral`, `integral2`, and `integral3` perform numerical integration with additional support for nonrectangular and unbounded regions of integration. They are the recommended functions for performing quadrature.

#### Performance Enhancements

The following functions show improved performance:

#### griddata Supports 3-D Data and Natural Neighbor Interpolation

`griddata` is now the recommended function for interpolating 2-D and 3-D scattered data. `griddata` also has a new `method` option, `'natural'`, for specifying natural neighbor interpolation.

#### TriScatteredInterp Accepts Complex Values

You can now use `TriScatteredInterp` to interpolate complex scattered data in a single pass. For example, `F = TriScatteredInterp(X,V)` now accepts a complex vector `V`.

#### Set Functions Provide Option to Return Sets in Original Order

You now can specify the ordering of the output array returned by the functions `unique`, `union`, `intersect`, `setdiff`, and `setxor`. The new argument, `setOrder`, is one of two strings, `'stable'` or `'sorted'`. Specify `'stable'` if you want the elements in the output array to be in the same order as in the input array. For example:

`C = unique([9 2 2],'stable')` returns `C = [9 2]`.

Specify `'sorted'` if you want the elements in the output array to be in sorted order. For example:

`C = unique([9 2 2],'sorted')` returns `C = [2 9]`.

#### Set Functions Changing Behavior in a Future Release

• If there are repeated elements in the input arrays, the functions `unique`, `union`, `intersect`, `setdiff`, and `setxor` will return the index to the first occurrence of the repeated elements (or rows).

• The optional output array, `locb`, returned by `ismember`, will contain 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` will be column vectors.

• `unique` and `union` will support objects with methods `sort` (`sortrows` for the `'rows'` option), and `ne`. This includes heterogeneous arrays derived from the same root class.

• `intersect`, `setdiff`, `setxor`, and `ismember` will support objects with methods `sort` (`sortrows` for the `'rows'` option), `ne`, and `eq`. This includes heterogeneous arrays derived from the same root class.

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

 Note:   The set functions already conform to this behavior when you call them with the new `setOrder` argument.

#### Compatibility Considerations

The new behavior change is introduced for adoption in R2012a. If you want to assess the impact this change might have on your existing code, specify `'R2012a'` as the final input argument to `unique`, `union`, `intersect`, `setdiff`, `setxor`, and `ismember`. For example:

`[C,IA,IC] = unique([9 9 1],'R2012a')`
```C = 1 9 IA = 3 1 IC = 2 2 1 ```

If the changes adversely affect your code, you can specify `'legacy'` to preserve the current behavior. For example:

`[C,IA,IC] = unique([9 9 1],'legacy')`
```C = 1 9 IA = 3 2 IC = 2 2 1 ```

#### Interpolation and Computational Geometry Functionality Being Removed or Changed

FunctionalityWhat Happens When You Use This FunctionalityUse This InsteadCompatibility Considerations
`interp1q`Still Runs`interp1`Replace all instances of `interp1q` with `interp1`.
`interp1(..., 'cubic')`Still Runs`interp1(..., 'pchip')`Replace all instances of `interp1(..., 'cubic')` with ```interp1(..., 'pchip')```.
Passing nonuniformly spaced points or grid to:
```interp1(..., 'v5cubic') interp2(..., 'cubic') interp3(..., 'cubic') interpn(..., 'cubic') ```
Warns
```interp1(..., 'spline') interp2(..., 'spline') interp3(..., 'spline') interpn(..., 'spline') ```
In previous releases, `interp1`, `interp2`, `interp3`, and `interpn` silently changed the `'v5cubic'` and `'cubic'` methods to `'spline'` when the sample data was not uniformly spaced. Now, a warning is issued if the uniformity conditions are not honored. To avoid the warning message, change any instances that call for`'v5cubic'` or `'cubic'` to the `'spline'` method.
Passing the `'pp'` flag to `interp1`. For example:

```pp = interp1(x, v, 'linear', 'pp');vq = ppval(pp, xq);```
Still RunsUse `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);```
`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', ...)```.
`interp1(x,V,..)` where `x` is a vector and `V` is an array representing multiple value sets. For example:
```x = (1:5)'; V = [x, 2*x, 3*x]; xq = (1:0.5:5)'; Vq = interp1(x, V, xq);```
Still RunsUse `griddedInterpolant` and loop over each value set, updating and evaluating during each iteration.Replace all instances of `interp1(x,V,...)`, where `x` is a vector and `V` is an array representing multiple value sets. Loop over `V`, calling `griddedInterpolant` on each value set. The following example code shows how to set up and interpolate over three value sets in `V` :

```x = (1:5)'; V = [x, 2*x, 3*x];xq = (1:0.5:5)';F = griddedInterpolant(x, V(:,1));for n=1:3  F.Values = V(:, n);  Vq(:, n) = F(xq);end```

The columns of `Vq` are the interpolation results for the corresponding columns of `V`.
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(..., *METHOD) interp2(..., *METHOD) interp3(..., *METHOD) interpn(..., *METHOD)```

Still Runs

Errors for invalid input data

```interp1(..., METHOD) interp2(..., METHOD) interp3(..., METHOD) interpn(..., METHOD)```
In previous releases, `interp1`,`interp2`,`interp3`, and `interpn` provided a `*METHOD` option that bypassed error checking on the assumption of valid data. These checks are no longer bypassed. Use the `griddedInterpolant` class to perform repeated interpolation queries on the same data set without penalty of repeated error checks.
`vq= griddata(x,y,v,xq,yq)` where `xq` is a row vector and `yq` is a column vector.Still Runs`vq= griddata(x,y,v,Xq,Yq)` where `Xq` and `Yq` are the output arrays returned by `meshgrid`.Modify all instances that pass mixed orientation vectors to `griddata`. To specify a grid of query points, construct a full grid with `meshgrid` before calling `griddata`.
`griddata3`Errors`griddata`Replace all existing instances of `griddata3` with `griddata`.
`delaunay3`Errors`delaunay`Replace all existing instances of `delaunay3` with `delaunay`.
`tsearch`Errors`DelaunayTri/pointLocation`Replace all existing instances of `tsearch` with `DelaunayTri/pointLocation`.
`dsearch`Errors`DelaunayTri/nearestNeighbor`Replace all existing instances of `dsearch` with `DelaunayTri/nearestNeighbor`.
`convhull(..., OPTIONS)`ErrorsOmit the `OPTIONS` argument when you call `convhull`.Remove the `OPTIONS` argument from all instances that pass it to `convhull`.
`delaunay(..., OPTIONS)`ErrorsOmit the `OPTIONS` argument when you call `delaunay`.Remove the `OPTIONS` argument from all instances that pass it to `delaunay`.
`griddata(..., OPTIONS)`ErrorsOmit the `OPTIONS` argument when you call `griddata`.Remove the `OPTIONS` argument from all instances that pass it to `griddata`.
`voronoi(..., OPTIONS)`ErrorsOmit the `OPTIONS` argument when you call `voronoi`.Remove the `OPTIONS` argument from all instances that pass it to `voronoi`.

#### Other Functionality Being Removed or Changed

FunctionalityWhat Happens When You Use This FunctionalityUse This InsteadCompatibility Considerations
`isequalwithequalnans`Still Runs`isequaln`Replace all instances of `isequalwithequalnans` with `isequaln`.
`mimofr`Still RunsNot ApplicableRemove all instances of `mimofr` from your existing code.
`RandnAlg` property of `RandStream` classWarns`NormalTransform` property of `RandStream` classReplace all existing instances of `RandnAlg` with `NormalTransform`.
`setDefaultStream` method of `RandStream` classWarns`setGlobalStream` method of `RandStream` classReplace all existing instances of `RandStream.setDefaultStream` with `RandStream.setGlobalStream`.
`getDefaultStream` method of `RandStream` classWarns`getGlobalStream` method of `RandStream` classReplace all existing instances of `RandStream.getDefaultStream` with `RandStream.getGlobalStream`.
`atan2(y,x)` for complex `y` and `x`.Errors`atan2(real(y),real(x))` when `y` and `x` are complex.Replace all existing instances of `atan2(y,x)` with `atan2(real(y),real(x))` where `y` and `x` are complex.
Second output argument for `besselh`, `besseli`, `besselj`, `besselk`, `bessely`, and `airy`. For example, `[J,ierr] = besselj(nu,Z)`.WarnsSyntax 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)`
Warns

Construct the inputs with `ndgrid` or `meshgrid` first. 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)`Warns`Y = psi(k,X)` where `k` is a scalar specifying the `k`th 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),[])`
Warns`J = 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.

### Programming

The `xlsread` function now reads data from XLSX files on all platforms, including support for specifying the range and worksheet number. Previously, this functionality was available only on Microsoft Windows systems with Excel software.

#### VideoWriter Supports MPEG-4 Files on Windows 7 Systems

`VideoWriter` now creates MPEG-4 files with the extension `.mp4` or `.m4v` on Windows 7 systems. For more information, see the `VideoWriter` reference page.

#### audioplayer Supports Overlapping Playback

In R2011a, changes that allowed `audioplayer` to support device selection also disabled the ability to play overlapping audio samples. With R2012a, overlapping playback is available again.

For example, play a second sample before the first one completes, and hear audio from both:

```chirpData = load('chirp.mat'); chirpObj = audioplayer(chirpData.y,chirpData.Fs); gongData = load('gong.mat'); gongObj = audioplayer(gongData.y,gongData.Fs); play(chirpObj); play(gongObj);```

#### importdata Returns Different Output for Some Text Files

Previously, the `importdata` function recognized comments in text files and did not include them in the output. In addition, `importdata` parsed files that contained numeric values and comma, space, or tab delimiters into a numeric array, even when you specified a delimiter that did not match the contents of the file.

In this release, `importdata` honors the specified delimiter, and includes comments in the output. For example, consider a hypothetical file named `test.txt` with this space-delimited data:

```% Comment in file 1 2 3 4 5 6```

In previous releases,

`t = importdata('test.txt',',')`

returned a numeric array:

```t = 1 2 3 4 5 6```

In this release, the same code returns a cell array:

```t = '% Comment in file' '1 2 3' '4 5 6' ```

If you remove the incorrect comma delimiter,

`t = importdata('test.txt')`

`importdata` returns a struct array:

```t = data: [2x3 double] textdata: {'% Comment in file'}```

#### Exponents Print with Two Digits

In previous releases, functions that printed floating-point values with exponents used three digits for the exponent on Windows systems, but two digits on any other system. Now, these functions use two digits for the exponent on all systems.

For example,

`str = sprintf('%e',pi)`

always returns

```str = 3.141593e+00```

#### Conversion of Error and Warning Message Identifiers

For R2012a, 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:eigs:NonPosIntSize` identifier has changed to `MATLAB:eigs:RoundNonIntSize`. If your code checks for `MATLAB:eigs:NonPosIntSize`, you must update it to check for `MATLAB:eigs:RoundNonIntSize` instead. For a mapping of the new identifiers to the original identifiers, see Technical Support solution `1-ERAFNC`.

#### Specify a List of Allowed Subclasses in the Class Definition

You can control which classes are allowed to subclass a class that you define by specifying a list classes in the new class attribute, `AllowedSubclasses`. See Controlling Allowed Subclasses for more information.

#### Compatibility Considerations

In previous releases, you could assign a value to the following class member access attributes as a value returned by a function:

• Properties – `Access`, `GetAccess`, and `SetAccess`

• Methods – `Access`

• Events – `ListenAccess` and `NotifyAccess`

With this release, you can specify values for these attributes only explicitly as either the appropriate character string or a `meta.class` object returned by the `?` operator, or a cell array of character strings and/or `meta.class` objects. See Specify Access to Class Members for more information.

#### Method Declared as Abstract and Private Now Errors

In previously releases, declaring a method as both `Abstract` and ```Access = private``` did not cause an error. With this release, declaring a method both `Abstract` and `private` causes an error.

#### Compatibility Considerations

If any of your class definitions declare a method as both `Abstract` and `private`, you need to declare the method either as `Abstract`, which make the class abstract and requires subclasses to implement the method with the declared syntax, or declare the method ```Access = private```, which means that only methods within the defining class can call the `private` method.

Declaring a method as both `Abstract` and `private` is not supported.

#### New Capabilities for Writing Image Data to FITS Files

MATLAB now includes a function named `fitswrite` that you can use to write image data to Flexible Image Transport System (FITS) files. You can also display the metadata for all Header-Data Units (HDUs) in a FITS file using the `fitsdisp` function. (MATLAB already supports reading FITS files using the `fitsread` function.)

In addition, MATLAB now includes a new package, called `matlab.io.fits`, containing dozens of functions that provide access to the routines in the CFITSIO library. Using these low-level functions, you can create FITS files, read data from FITS files and write data to the files, using the CFITSIO library, version 3.27.

#### Access Data on Remote Servers Using the OPeNDAP Protocol

You can read data stored on remote servers using the OPeNDAP protocol capability of the following MATLAB NetCDF functions:

To use these functions to access data on remote servers using OPeNDAP protocol, specify the URL instead of a file name.

#### Upgrades to Scientific File Format Libraries

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

LibraryVersion

#### Ability to Read NetCDF Files Using HDF4 Functions Removed

In past releases, for certain NetCDF files on Linux and Macintosh systems, you could read the files using the HDF4 functions. This capability has been removed. To read NetCDF files, use the high-level NetCDF functions or the low-level NetCDF package.

#### Functionality Being Removed or Changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
`avifile`Still runs`VideoWriter`Replace all instances of `avifile` with `VideoWriter`.
`fileparts` return argument 4 (file version)Errors — beginning in MATLAB Version 7.13 (R2011b)No alternative; file versions are unsupportedCall `fileparts` with three return arguments: `[path_name, file_name, file_extension]`
`helpbrowser`Still runs`doc`Replace all instances of `helpbrowser` with `doc`.
`helpdesk`Still runs`doc`Replace all instances of `helpdesk` with `doc`.
`helpwin`Still runs`doc`Replace all instances of `helpwin` with `doc`.
`info`Warns Remove all instances of `info`. Find information about MathWorks at `www.mathworks.com/company/aboutus/contact_us`.
`mmreader`Warns, creates a `VideoReader` object`VideoReader`Replace all instances of `mmreader` with `VideoReader`.
`mmreader.isPlatformSupported` and `VideoReader.isPlatformSupported`Errors For a platform-specific list of supported video file formats, use `getFileFormats`.
`support`Warns Remove all instances of `support`. Find the MathWorks technical support page at `www.mathworks.com/support`.
`whatsnew`Warns Remove all instances of `whatsnew`.

### New Compiler Support

MATLAB Version 7.14 (R2012a) supports these new compilers for building MEX-files on Linux 64- and 32-bit platforms:

• GNU gcc Version 4.4.6

MATLAB supports these new compilers for building MEX-files on Windows 64- and 32-bit platforms:

• Intel Visual Fortran Composer XE 2011 SP1 (12.1)

### Discontinued Compiler Support

MATLAB no longer supports the following compilers:

#### Windows 64-Bit Platforms

• Microsoft Visual Studio® 2010 (10.0) Express

#### Windows 32-Bit Platforms

• Microsoft Visual Studio 2010 (10.0) Express

• Visual C++ 6.0

#### Linux (64- and 32-Bit) Platforms

• GNU gcc Version 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 Web page.

#### mxAssert and mxAssertS Functions Throw MATLAB Exception

The `mxAssert` and `mxAssertS` functions now throw the MATLAB exception `MATLAB:mex:assertion` and terminate the MEX-file instead of aborting MATLAB.

#### Version Support for COM ProgID Values

You can specify version-specific Programmatic Identifiers (ProgID) for MATLAB Version 7.14 (R2012a) and later.

• `MATLAB.Desktop.Application`

• `MATLAB.Application`

• `MATLAB.Application.Single`, to specify a dedicated server.

## R2011b

New Features, Bug Fixes, Compatibility Considerations

### Desktop Tools and Development Environment

#### Command Window

Error messages in the Command Window no longer appear with question marks or arrows. In addition, error messages for each function now provide a link to that function's documentation.

The following images show examples of the differences in presentation:

• Built-in functions:

• MATLAB Version 7.13 (R2011b)

• MATLAB Version 7.12 (R2011a) and earlier

• Functions that are not built in:

• MATLAB Version 7.13 (R2011b)

• MATLAB Version 7.12 (R2011a) and earlier

#### Editor

New Desktop features and changes introduced in this version are:

### Automatically Renaming All Variables and Functions in File

Under certain conditions, as you rename a variable or function, a tooltip opens. The tooltip indicates that MATLAB can rename all instances of the function or variable in the current file. This is helpful in preventing errors that result if you change names manually and overlook or mistype one or more instances of the name. For a video overview, watch this video demo

For details, including the circumstances under which MATLAB prompts you, see Automatically Rename All Functions or Variables in a File.

### Displaying Multilingual Characters on Mac OS X Platforms

On Apple Mac OS X platforms, you might see garbled text if you try to use multilingual characters. Suppose you create a variable in the MATLAB command window containing multilingual characters. You can type the multilingual characters, but if you display the contents of the variable, the characters are corrupted.

MATLAB text files include scripts and user-defined functions and classes. MATLAB displays characters in a text file using an encoding scheme, which is defined in the MathWorks locale database. This encoding scheme supports characters for the language specified by the user locale setting. If you try to use multilingual characters in a text file, you may have to use a different encoding scheme. UTF-8 is often used to handle multilingual characters. In R2011b, to handle multilingual characters, you can change the default encoding scheme to UTF-8 by switching the MathWorks locale database. Note that changing the default encoding scheme might cause characters other than 7-bit ASCII characters in existing text files to be garbled.

#### How to Change MATLAB's Default Encoding to UTF-8

You can change the default encoding scheme on Mac OS X platforms by using the UTF-8 locale database found in the `matlabroot``/bin` folder. If you have text files containing characters other than 7-bit ASCII characters, you must convert the encoding before changing the default encoding. For instructions, see How to Convert Text File Encoding to UTF-8.

To change the default locale database, type:

```mldir = fullfile(matlabroot,'bin'); copyfile(fullfile(mldir,'lcdata.xml'),... fullfile(mldir,'lcdata_default.xml')); copyfile(fullfile(mldir,'lcdata_utf8.xml'),... fullfile(mldir,'lcdata.xml')); ```

#### How to Convert Text File Encoding to UTF-8

Before converting a file, copy the file to a new directory.

Use the Mac OS X TextEdit application to convert the file encoding. For example:

1. Open a MATLAB text file with TextEdit.

2. Select File ->Save as...

3. Change the file name.

4. Change Plain Text Encoding: to ```Unicode (UTF-8)```.

5. Save the file.

Alternatively, the following MATLAB code creates a new text file with the encoding set to `UTF-8`:

```function convertencoding(infile, outfile) fpIn = fopen(infile, 'r', 'n'); fpOut = fopen(outfile, 'w', 'n', 'UTF-8'); while feof(fpIn) == 0 lineIn = fgets(fpIn); fwrite(fpOut, lineIn, 'char'); end fclose(fpIn); fclose(fpOut); end```

#### Compatibility Considerations

In a future release, the UTF-8 version of the MathWorks locale database will be the default on Mac OS X systems. Any text file created in MATLAB that is encoded in the user default encoding and contains characters other than 7-bit ASCII characters must be converted to the UTF-8 encoding scheme. Otherwise, MATLAB and other MathWorks products might not be able to properly load the files.

You must convert the file encoding before changing the default locale database.

### Mathematics

#### New Functionality for Grid-Based Interpolation

MATLAB includes a new class, `griddedInterpolant`, for grid-based interpolation. `griddedInterpolant` works with grids in `ndgrid` format and complements the functionality provided by `interpn` to provide improved performance and memory efficiency.

#### Performance Enhancements

The following functions show improved performance:

#### Permutation Option for randperm

The `randperm` function and the `RandStream.randperm` method now have the option of returning random permutations of `k` integers selected at random from the integers 1 through `n`.

#### Return Permutation Information in Vector for qr

If you use the three-output form of `qr` in noneconomy mode, you can now specify `'vector'` as an input argument. The permutation information will return a vector instead of a matrix.

#### Changes to meshgrid and ndgrid

The functions `meshgrid` and `ndgrid` have changed behavior under certain calling scenarios:

• When more than one input argument is passed to `meshgrid`, the dimensionality of the output arrays is deduced from the number of inputs.  Previously the dimensionality was deduced from the number of outputs.  For example, `[x,y] = meshgrid(1:3,1:4,1:5)` will now assume a missing third output argument and return 3-D output arrays `x` and `y`. Previously, the third input was ignored and the function returned 2-D arrays for `x` and `y`.

• When a single argument is passed to `ndgrid`, the dimensionality of the output arrays is dictated by the number of output arguments. `ndgrid` has been revised to maintain consistency in the case of a single input and output. `ndgrid` will now degenerate naturally to support 1-D outputs. For example, ```x = ndgrid(1:5)``` returns a `5`-by-`1` output vector `x`. Previously, a `5`-by-`5` array was returned.

#### Functionality Being Removed or Changed

FunctionalityWhat Happens When You Use This FunctionalityUse This InsteadCompatibility Considerations
`bessel`Errors`besselj`Replace all instances of `bessel` with `besselj`.
ODE solver syntax
`solver``('vdp',t0,tfinal,y0)`
where `solver` is one of the ODE solvers `ode45`, `ode23`, `ode113`, `ode15s`, `ode23s`, `ode23t`, or `ode23tb`
Errors`solver``('vdp',[t0 tfinal],y0)`
or
`solver````(@vdp,[t0 tfinal],y0)```
Replace all instances of the syntax `t0,tfinal` with ```[t0 tfinal]```.
Values `on` and `off` for `Mass` property of `odeset` and `odeget`ErrorsSet the `Mass` property to a constant matrix or a function that evaluates the variable mass matrix.Update your code to use a constant mass matrix or a function that evaluates the variable mass matrix. For more information, check the supported settings of `Mass` and `MassStateDependency` in the `odeset` properties.
`MassConstant` property of `odeset` and `odeget`ErrorsFor a constant mass matrix, set the `Mass` property to that matrix. For a time-dependent mass matrix, set the `Mass` property to a function that evaluates the matrix and set the `MassStateDependency` property to `none`.Update your code to use a constant mass matrix or a function that evaluates the variable mass matrix. For more information, check the supported settings of `Mass` and `MassStateDependency` in the `odeset` properties.

### Programming

#### Load and Save Parts of Variables in V7.3 MAT-Files

The new `matfile` function creates a `matlab.io.MatFile` object that can efficiently load or save to parts of variables in Version 7.3 MAT-Files. Loading part of a variable requires less memory than loading the entire contents of that variable.

For example, these commands create a MAT-file and add data to part of variable `X`:

```new = matfile('newfile.mat','Writable',true); new.X(6:10,6:10) = magic(5); ```

This command loads part of the data into variable `partOfX`:

`partOfX = new.X(1:8,1:8);`
 Note:   Syntax such as `size(new.X)` or `new.X(end,end)` temporarily loads the entire contents of variable `X` into memory. To determine the size of a variable without loading, use the `size` method for `matlab.io.MatFile` objects:```sizeOfX = size(new,'X'); ```

For more information, see the `matfile` reference page or watch this video demo.

#### Nonmatching Function Name Warning is Now an Error

In previous releases of MATLAB, entering a function name that did not match any known function name in the given letter case resulted in a warning. After displaying this warning message, MATLAB attempted find a function that would match if letter case were ignored. If such a match were found, MATLAB ran this function instead.

In MATLAB R2011b, the MATLAB software generates an error if it can't find an exact-case match. The message displayed by the error may suggest the correct spelling for the function that was entered. The message identifier for this error reads as follows:

`'MATLAB:dispatcher:InexactCaseMatch'`

#### Compatibility Considerations

If you have a program that calls another program with nonmatching letter case, the call to this function now throws an error.

#### New narginchk Function Replaces nargchk

`narginchk` is a new function that replaces and adds to the functionality of `nargchk`.

The `narginchk` function differs from `nargchk` in the following ways:

• `narginchk` accepts only 2 inputs: the minimum and maximum allowable number of arguments one can pass to the currently running function.

• `narginchk` returns no outputs. Instead, it throws an error if the number of arguments passed to the current function is outside the allowable range

#### Conversion of Error and Warning Message Identifiers

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

#### Compatibility Considerations

If you have code that uses 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:eigs:NonPosIntSize` identifier has changed to `MATLAB:eigs:RoundNonIntSize`. If your code checks for `MATLAB:eigs:NonPosIntSize`, you must update it to check for `MATLAB:eigs:RoundNonIntSize` instead. For a mapping of the new identifiers to the original identifiers, see Technical Support solution `1-ERAFNC`.

The new Spreadsheet Import Tool allows you to select ranges of data and define rules for handling nonnumeric values. This tool opens instead of the Import Wizard for spreadsheets and comma-separated value (CSV) files. For more information, watch this video demo.

#### Two Functions Added to netCDF Low-Level Package To Aid Performance

The NetCDF low-level package now includes two functions that you can use to improve performance:

• `netcdf.getChunkCache` – Return default chunk cache settings.

• `netcdf.setChunkCache` – Set the default chunk cache settings.

#### Improved Performance for TIFF Input and Output

Input and output performance for TIFF files has been improved, when using `imread` and `imwrite`.

#### Upgrades to Scientific File Format Libraries

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

NetCDF4.0.1 to 4.1.2
HDF51.8.3 to 1.8.6
HDF44.2r4 to 4.2.5
HDF-EOS2.16 to 2.17
TIFF3.7.1 to 3.9.5

#### VideoReader Supports MPEG-4 and MOV on Windows 7 Systems

`VideoReader` now imports MPEG-4 and Apple QuickTime movies, and any other formats supported by Microsoft Media Foundation, on Windows 7 systems. For more information, see the `VideoReader` reference page.

#### MATLAB Warns if Listener Defined for Nonobservable Property

If you attempt to create a `PreSet` or `PostSet` listener for a property that is not declared as `SetObservable`, MATLAB issues a `MATLAB:class:nonSetObservableProp` warning.

If you attempt to create a `PreGet` or `PostGet` listener for a property that is not declared as `GetObservable`, MATLAB issues a `MATLAB:class:nonGetObservableProp` warning.

In previous releases, MATLAB did not warn in either case, but did not call the listener callback function when a set or get event occurred. In a future release, these warnings will become errors.

#### Compatibility Considerations

If you use class metadata or the `properties` function to get a list of properties for which you create listeners, add warning/error handling for these conditions. A better approach is to use `findobj` to get the list of observable properties for any given class and assign listeners only for those properties.

#### MATLAB Warns if Property Is Not Member of Class When Defining Listener

When calling the `event.proplistener` constructor, or calling the `addlistener` method with an array of `meta.property` objects, warning messages alert you if a property is not a member of the correct class.

• Nonscalar input objects: if any one of the properties is not a valid member of the class of the object array, MATLAB issues the `MATLAB:class:PropNotMember` warning .

• Scalar input object: if any of the properties are not valid dynamic or class properties, MATLAB issues the `MATLAB:class:DynPropNotMember` or `MATLAB:class:PropNotMember` warning.

In previous releases, MATLAB did not warn in either case. In a future release, these warnings will become errors.

#### Built-In disp Works with Empty Objects

It is now possible to call the built-in `disp` function with empty objects. For example, define the `TestClass` as:

```classdef TestClass properties PropertyA = 1; end end```

Then call the built-in version of `disp`:

```>> builtin('disp',TestClass.empty) 0x0 empty TestClass Properties: PropertyA Methods```

In previous releases, calling the built-in `disp` function did not display anything with empty objects.

#### MATLAB Warns if Class Defines Property as Dependent and Constant

MATLAB now issues a warning if a class defines properties as both `Dependent` and `Constant`. In a future release, this warning will become an error.

#### Support for Switch/Case Statements with Objects

You can construct `switch` statement blocks using objects as both the switch expression and the case expression. The object's class must define or inherit an `eq` (`==`) method. See Using Switch/Case Statements with Objects in Functions Used with Objects for more information.

#### Functionality Being Removed or Changed

FunctionalityWhat Happens When You Use This Functionality?Use This InsteadCompatibility Considerations
`nargchk`Still runs`narginchk`Accepts only `min` and `max` inputs, returns no output, generates error.
`nargoutchk`Still runs`nargoutchk` (see new syntax)Accepts only `min` and `max` inputs, returns no output, generates error.

### New Compiler Support

MATLAB Version 7.13 (R2011b) supports these new compilers for building MEX-files on Windows 64- and 32-bit platforms:

• Microsoft Windows Software Development Kit for Windows 7 and .NET Framework 4, Version 7.1

• Intel C++ Composer XE 2011

• Intel Visual Fortran Composer XE 2011

MATLAB Version 7.13 (R2011b) supports the following new compiler for building MEX-files on Mac OS X 64-bit platforms:

• Apple Xcode 4.0.0 with gcc 4.2.x

### Compiler Support To Be Phased Out

Support for the following compilers on Windows 64- and 32-bit platforms will be discontinued in a future release, at which time new versions will be supported. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

• Intel C++ Version 11.1

• Intel Fortran Version 11.1

#### New Object Support for mxGetProperty and mxSetProperty Functions

You can read and modify properties of Java and COM objects using the `mxGetProperty` and `mxSetProperty` functions.

#### MEX Header File Does Not Define C++ Type char16_t

The `matrix.h` header file, used by the `mex.h` header file for building C/C++ MEX-files, no longer defines the C++ type `char16_t`.

#### Compatibility Considerations

If your MEX-file uses the `char16_t` type, you must include the appropriate header file for your compiler in order to build the MEX-file. For example, the header file for Microsoft Visual Studio Version 10.0 is `yvals.h`.

### Support for Cell Arrays

#### Creating Cell Arrays from .NET Stings and Objects

Use the MATLAB `cell` function to convert .NET `System.String` and `System.Object` arrays to MATLAB cell arrays. For more information, see Converting .NET Arrays to Cell Arrays.

#### Passing Cell Arrays to .NET Methods

If an input argument to a .NET property or method is an array of `System.Object` or `System.String`, you can pass a cell array. MATLAB automatically converts a cell array into the appropriate .NET array. For more information, see Pass Cell Arrays.

### Support for Auto-Conversion of Multidimensional Arrays

You can pass MATLAB arrays directly to .NET without explicitly converting them into .NET arrays. MATLAB also converts an array of a lower dimensionality to a higher dimensionality .NET array. For more information, see Pass Arrays.

#### Compatibility Considerations

In most cases, you no longer need to use the `NET.convertArray` function. Review your MATLAB code to update the use of this function. If you continue to use `NET.convertArray`, note the following change of behavior for empty matrices:

• If you call `NET.convertArray` with an N-D empty matrix and try to convert it to 1-D .NET array, MATLAB throws the following error:

`Source and destination array dimension sizes do not match.`
• Different results for:

`NET.convertArray(rand(0,1,1))`

As of R2011a, MATLAB creates a `System.Double[,]`. In R2011b, MATLAB creates a `System.Double[]`.

#### COM Automation Server Error Message Formatting

Although some MATLAB Command Window messages have been reformatted (see Error Messages Reformatted for Improved Readability and Navigation), error messages from the `Execute` function can still be identified with leading `???` characters.

## R2011a

New Features, Bug Fixes, Compatibility Considerations

### Desktop Tools and Development Environment

#### Desktop

New features and changes introduced in Version 7.12 (R2011a) are:

### MATLAB Menus Display at the Top of the Apple Mac Screen

Previously when running on Apple Mac, menus displayed at the top of the MATLAB desktop. In addition, if a tool was undocked from the desktop, the menu displayed at the top of that tool. Now, to be consistent with the behavior of most Mac applications, MATLAB menus display at the top of the Mac screen.

### New Location and Archived Content for Product Documentation

The new MathWorks Web site location for product documentation is http://www.mathworks.com/help/. Accessing the old URL, http://www.mathworks.com/access/helpdesk/help/helpdesk.html, redirects you the new location.

In addition to all current product documentation, the new location provides archived product documentation from all releases going back to R13sp2 (including Japanese, when available). To go to the archive, click the View documentation for other releases link. The archived release documentation is available only at the MathWorks Web site, and not via the Help browser.

To view some documentation you must log on to `www.mathworks.com` with your MathWorks user name and password. For example, you need to log in to view current PDF files and documentation from prior releases.

The View > Page Location dialog box in the Help browser now links to documentation at the MathWorks Web site that accompanies the release you are currently running. For example, when you run R2011a, the dialog box looks like this.

As of R2011a, the Help Browser View > Page Location dialog box (shown above) is available on Japanese language systems.

### Submit Support Requests Directly from MATLAB

As of this release, if you need assistance from MathWorks product support, you can request it directly from the MATLAB desktop. Selecting the Submit a MathWorks Support Request option from the Help menu opens a login dialog for you to provide the e-mail address and password for your MathWorks account. After you log in, a form displays for you to create a service request. Select the product for which you want help, explain the issue you are having, give the request a meaningful title, describe the issue you are having, provide reproduction steps, and attach files that enable Technical Support to follow the steps.

If you do not have a MathWorks account, the login form enables you to create one. MathWorks accounts are free and without obligation. You can also use the account login form to obtain a forgotten MathWorks password. You can log out before submitting your request or remain logged in.

For an example of submitting a support request, see this video demo. For further details about requesting service requests from MATLAB, see Contact Technical Support.

#### Managing Files

New features and changes introduced in Version 7.11 (R2011a) are:

### Renaming Files and Folders in the Current Folder Browser Now Reflected in the Editor

If a file is open in the Editor and you:

• Rename that file in the Current Folder browser, then the file name updates in the Editor

• Rename the folder containing that file in the Current Folder Browser, then MATLAB updates the file specification for all open Editor documents in the renamed folder

• Delete that file from the Current Folder browser, then MATLAB deletes the file from disk and renames the Editor document to `Untitled*`

If more than one unnamed document is open in the Editor, then MATLAB renames the deleted document `Untitledn*`, where `n` is an integer.

However, modifying file and folder names from either of the following does not update names for open documents in the Editor:

• The operating system file manager — such as Windows Explorer

• The MATLAB Command window — using `movefile`, for instance

### Options Names Changed for Locating and Opening Files and Folders Outside the MATLAB Desktop

To locate a file or folder in Windows Explorer or Apple Mac Finder, you previously used the Current Folder browser context-menu option, Locate on Disk. Now the option is one of the following:

• On Microsoft Windows systems—Show in Explorer

• On Macintosh systems—Show in Finder

In addition, from the Current Folder browser, you can open the current folder in Explorer or Finder. Right-click in white space, and then select Open Current Folder in Explorer or Open Current Folder in Finder.

### Comparison and Merging of MAT-file Variables

When comparing MAT-files, you now can view details of differences between variables to see which fields of a structure are different and to view differences in individual elements of an array. You can merge changes between files by copying variables from one file to another. For details, see Comparing MAT-Files.

### Filter Results in Folder Comparisons

You now can define filters to exclude unimportant differences when comparing folders. For example, you can exclude backup files or files created by a revision control system. Filters can save time when reviewing differences, especially when comparing many subfolders. For details, see Comparing Folders and Zip Files.

### Showing Differences Only in Text Comparisons

When comparing text files, you now can specify whether to show only differences. Use the new toolbar button in the Comparison Tool to hide sections of the report that do not include any differences. It can be useful to hide unmodified lines in large text comparison reports. For details, see Comparing Text Files.

#### Editing and Debugging MATLAB Code

New Desktop features and changes introduced in Version 7.11 (R2011a) are:

### Change to Tooltip and Behavior for M-Lint Messages

Previously, when you hovered the mouse pointer over code in the Editor that has an autofixable M-Lint warning message, a tooltip opened that included the phrase, Press Alt + Enter to fix, as shown in this image.

Now, this phrase is removed from the M-Lint tooltip. You can still use the keyboard shortcut, Alt+Enter, to apply the autofix, but your cursor must be within the code to which the autofix will be applied.

#### Compatibility Considerations

When an M-Lint tooltip is open and you want to apply the autofix for that warning, click the Fix button. To apply the same autofix using a keyboard shortcut, move the cursor within the code that generates the warning, and then click Alt+Enter.

### Changed Default Preference for Deleting Autosaved Files

Previously, the Automatically delete autosave files preference for the Editor was disabled by default. Now, it is enabled by default. However, as usual, MATLAB retains settings you set explicitly in a previous release (unless you delete `matlab.prf`. )

### Shared Scope Color Preferences Apply to Persistent and Global Variables

Previously, the preference for Variables with shared scope was labeled Nonlocal variables and it affected the color of variables within nested functions only. Now, the Editor also applies this color preference to variables you declare as global or persistent.

This feature makes it easier to find reuses of a variable, which sometimes indicate variable scoping problems. For details, including information on how to disable or change the colors that the Editor uses for variables with shared scope, see Avoid Variable and Function Scoping Problems.

#### Publishing MATLAB Code

New Desktop features and changes introduced in Version 7.11 (R2011a) are:

### Change to Menu Option for Including Blocks of LaTeX Code

Previously, if you wanted to include blocks of LaTeX code within your MATLAB code intended for publishing, you selected Cell > Insert Text Markup > LaTeX Equation. Now you select Cell > Insert Text Markup > LaTeX Display Math. The name of the option was changed to better distinguish it from a new publishing option that enables you to include inline LaTeX equations in your published code.

For details see LaTeX Display Math.

### Menu Option to Include Inline LaTeX Math in Published MATLAB Code

The Cell menu now provides an option for including inline LaTeX equations. Position the cursor within the comment line where you want the LaTeX equation to appear, and then select Cell > Insert Text Markup > LaTeX Inline Math.

For details see Inline LaTeX Math Equations.

Menu labels for MATLAB Notebook are changed. To ensure your menu options are up to date, and match those presented in the documentation, run the following command:

`notebook -setup`

MathWorks recommends you run this command whenever you install a new version of MATLAB.

### Mathematics

#### New Function rng

The new `rng` function controls the random number generator used by `rand`, `randi`, and `randn`. For a demonstration, see this instructional video.

`rng` is the recommended alternative to former `rand` and `randn` input syntaxes `'seed'`, `'state'` and `'twister'`. `rng` is a simpler alternative to the `RandStream` class. To use `rng`, see the documentation on Updating Your Random Number Generator Syntax.

#### New Function ichol

The new `ichol` function performs incomplete Cholesky factorization and is the recommended alternative to `cholinc`.

#### New Option for gammainc

The new options `gammainc(X,A,'scaledlower')` and `gammainc(X,A,'scaledupper')` now return scaled versions of the incomplete gamma function `gammainc`.

#### Performance Enhancement

• Matrix transpose

• Element-wise single precision functions

• Sparse matrix indexed assignment

• Many linear algebra functions

• Convolution for long vectors and large matrices with `conv` and `conv2`

#### Changes to qr

In R2010a and R2010b, the upper triangular output `R` from the full `qr` function was guaranteed to have real and nonnegative diagonal elements. In this release, the behavior reverts to that of R2009b and prior releases. That is, the diagonal of `R` may contain complex and negative elements, and will affect the unitary output `Q` correspondingly.

#### Compatibility Considerations

Since the QR factorization is not unique, these different results are still correct. Ensure that your code does not depend on the values of the elements of the factors `Q` and `R`.

#### Functionality Being Removed

Function NameWhat Happens When You Use This FunctionUse This Function InsteadCompatibility Considerations
`bessel`Errors`besselj`Replace all instances of `bessel` with `besselj`.
`intwarning`ErrorsNoneRemove all instances of `intwarning` from your code.
`luinc`Warns`ilu`Replace instances of `luinc` with `ilu`.
`cholinc(X,'inf')`WarnsNoneRemove all instances of `cholinc(X,'inf')` from your code.
All other syntaxes of `cholinc` except `cholinc(X,'inf')`Warns`ichol`Replace these instances of `cholinc` with `ichol`.
`RandnAlg` property of `RandStream` classStill runs`NormalTransform` property of `RandStream` classReplace all existing instances of `RandnAlg` with `NormalTransform`.
`setDefaultStream` method of `RandStream` classStill runs`setGlobalStream` method of `RandStream` classReplace all existing instances of `RandStream.setDefaultStream` with `RandStream.setGlobalStream`.
`getDefaultStream` method of `RandStream` classStill runs`getGlobalStream` method of `RandStream` classReplace all existing instances of `RandStream.getDefaultStream` with `RandStream.getGlobalStream`.
`rand` or `randn` with the `'seed'`, `'state'` or `'twister'` inputsStill runs`rng`See Updating Your Random Number Generator Syntax in the MATLAB Mathematics documentation.

### Programming

#### Regenerate P-code Files Built Before Version 7.5

To enable the MATLAB software to take advantage of significant performance improvements planned for a future release, MathWorks recommends that you begin to regenerate any P-code files you use that were generated prior to MATLAB 7.5 (release R2007b). P-code files generated in releases earlier than R2007b will not run in this future release with the new performance features enabled.

#### Compatibility Considerations

Using MATLAB 7.5 or later, rebuild any P-code files that you expect to need in the future.

#### VideoWriter Supports Motion JPEG 2000 Files

`VideoWriter` now creates Motion JPEG 2000 (`.mj2`) files, which support logging data with these features:

• Multi-byte precision, such as 10, 12, or 16 bits

• Signed data values

• Lossless compression

For more information, see the `VideoWriter` reference page.

#### audioplayer and audiorecorder Support Device Selection on All Platforms

`audioplayer` and `audiorecorder` now allow you to specify the input or output device on all supported platforms. In previous releases, you could only specify devices on Microsoft Windows systems.

#### Compatibility Considerations

• `audioplayer`, `audiorecorder`, and `audiodevinfo` now use different technology for enumerating system input and output devices. If your existing code specifies a device ID (other than the default, `-1`), check whether you need to change the ID. To determine your device IDs, call `audiodevinfo`.

• `audioplayer` does not support overlapping playback. For example, in this code, the second call to `play` returns an error:

```chirpData = load('chirp.mat'); chirpObj = audioplayer(chirpData.y, chirpData.Fs); gongData = load('gong.mat'); gongObj = audioplayer(gongData.y, gongData.Fs); play(chirpObj); play(gongObj);```

#### New Class Forms the Basis for Heterogeneous Hierarchies

The `matlab.mixin.Heterogeneous` class enables you to form heterogeneous arrays containing instances of classes derived from this class. You can create heterogeneous hierarchies of both handle and value classes.

#### New Class Provides the Basis for Customizable Handle Object Copy Method

The `matlab.mixin.Copyable` class enables you to define handle classes that inherit a copy method whose behavior you can modify in subclasses.

#### MATLAB Meta-Classes Can Now Form Heterogeneous Arrays

All MATLAB meta-classes are now defined in a heterogeneous hierarchy, which enables the formation of heterogeneous arrays of meta-class objects. This capability enables functions like `findobj` and `findprop` to return heterogeneous arrays containing instances of meta-classes of different specific types. The hidden class `meta.MetaData` forms the root of the heterogeneous hierarchy.

#### New High-Level NetCDF Functions

MATLAB now includes several new functions that provide a high-level interface to NetCDF files. These functions let you read and write to NetCDF files, without having to use the programming paradigm required by the low-level functions in the netCDF package. Using these functions, you can create a new NetCDF file based on the schema of an existing file, convert files between NetCDF formats, and create a new NetCDF file by merging together two existing NetCDF files.

#### New High-Level HDF5 Functions

MATLAB now includes several new high-level functions for working with HDF5 files. These functions let you read and write to HDF5 files, without having to use the programming paradigm required by the low-level functions in the HDF5 package.

#### Compatibility Considerations

The new high-level HDF5 functions have the following compatibility considerations with the existing high-level HDF5 functions.

#### Two New Functions Added to CDFLIB Package

The MATLAB interface to the CDF library now includes the following new functions.

#### HDF4 Functions Grouped into Packages

The MATLAB HDF4 low-level functions and HDF EOS functions are now grouped into three new packages:

• `matlab.io.hdf4.sd` — access to more than 50 functions in the HDF library SD interface

• `matlab.io.hdfeos.gd` — access to more than 50 functions in the HDF-EOS library grid interface

• `matlab.io.hdfeos.sw` — access to more than 50 functions in the HDF-EOS library swath interface

For example, MATLAB previously included one function, `hdfsd`, that you used to call all the routines in the HDF library SD interface. Now, the new package `matlab.io.hdf4.sd` contains many individual functions that correspond to routines in the HDF SD Interface C library.

#### FITSREAD Function Now Supports Data Subsetting

The MATLAB `fitsread` function now supports data subsetting by using several new options: `PixelRegion`, `TableColumns`, and `TableRows`.

#### Unrecognized Name Warning Changed to Error

In earlier releases of MATLAB, a statement in which an unrecognized (e.g., misspelled) name immediately follows a function name and dot (`.`) results in a warning instead of an error. Here is the format this type of statement:

`functionname.unrecognizedname`

The following example shows such a statement case and part of the resulting warning:

```simulink.badname Warning: Direct access of structure fields returned by a function call (e.g., call to simulink) is not allowed. ...```

In addition to being misleading, handling this case with merely a warning also allows the function (`simulink`, in this case) to execute, regardless of the fact that the name to the right of the dot is invalid.

In MATLAB version 7.12 (R2011a), this type of statement throws an error. The text of the error message is:

```simulink.badname ??? Undefined variable "simulink" or function "simulink.badname".```

#### Compatibility Considerations

Any such statements in your code that have only generated a warning message in past releases will now throw an error. Any such error that is not caught and handled appropriately will terminate the function in which it occurs. MathWorks recommends that you replace the unrecognized name to the right of the dot with the correct name.

This change also affects the output of the `lasterror` function if you attempt to access any field value (`message`, `identifier`, or `stack`) directly. Earlier versions of MATLAB generate a warning:

```lasterror.message Warning: Direct access of structure fields returned by a function call (e.g., call to lasterror) is not allowed. ... ```

This and future versions throw an error:

```lasterror.message ??? Undefined variable "lasterror" or function "lasterror.message".```

#### Regular Expressions Support Zero-Length Matching

Regular expressions in MATLAB now support successful zero-length matching. See the documentation on Empty Match mode in the description of Command Options for the `regexp` function.

#### Growing Arrays Is Faster

This release improves the performance of growing an array in the trailing dimension if that array has not been preallocated.

#### Error Checking Improved

MATLAB provides more effective error checking and returns new error messages in the following cases.

### Nonstatic Method

A reference to a class method using the class name is valid only in cases where the method is static. Therefore, code of the form:

`ClassName.ordinaryMethod`

Where `ordinaryMethod` is not a static method of the class `ClassName`, previously returned the error: `MATLAB:class:InvalidStaticMethod`.

This code now returns the error: `MATLAB:subscripting:classHasNoPropertyOrMethod`

### Nonexistent Method Name

A reference to a nonexistent method name:

`obj.badName`

Where `badName` is not a method defined by the class of `obj`, previously returned the error: `MATLAB:noSuchMethodOrField`.

This code now returns the error: `MATLAB:subscripting:classHasNoPropertyOrMethod`.

#### Compatibility Considerations

Code that checks for the specific errors previously returned must be updated to check for the new errors.

#### Functions and Function Elements Being Removed

Function or Function Element NameWhat Happens When You Use the Function or Element?Use This InsteadCompatibility Considerations
`audioplayer(BufferLength)`No effect (no-op) Remove all instances of `BufferLength`.
`audioplayer(NumberOfBuffers)`No effect (no-op) Remove all instances of `NumberOfBuffers`.
`hdf5read`Still runs`h5read`Replace with preferred function.
`hdf5write`Still runs`h5write`Replace with preferred function.
`hdf5info`Still runs`h5info`Replace with referred function.

### Graphics and 3-D Visualization

#### Plot Catalog with a New Look, More Plots, and Diagnostics

The Plot Catalog GUI now offers a wider variety of plotting options. Its appearance and operation closely resemble the Plot Selector, with short descriptions of each graph type and a search box. It also categorizes graphs by type and by toolbox, and lets you designate personal Favorites (the top menu category). Access the Plot Catalog from the Plotting Tools Figure Palette, the bottom of the Plot Selector menu in the Workspace Browser, the Variable Editor, and various context menus. For a demonstration, see this instructional video.

This table lists the differences and similarities between the Plot Catalog and the Plot Selector.

Plot CatalogPlot SelectorBoth
Window CharacteristicsOpens in its own window, which persists until you close itOpens in a pop-up window that closes after it loses focusShow icons for plot types with descriptions and Favorites.
Help for Plot TypesDisplays partial help listings from reference pages in a resizeable pane within its windowOpens a popup help window with reference information when you hoverProvide the same help content and a More Help hyperlink to the Help Browser.
Plot Creation and ValidationProvides a field in which you can type variable names or expressions to plotPlots variables you select in the Workspace browser or Variable EditorValidate input variables and display diagnoses of incorrect or insufficient inputs.
Plot DestinationCurrent figure or new figureCurrent figureCreate figure, if none exists

Previously, the Plot Catalog did not validate input data. If you provided incorrect inputs for a plotting function, it attempted to use them, resulting in an incorrect plot or errors. Now, the Plot Catalog provides the same diagnostics as the Plot Selector. When you type workspace variable names into the Variables box on top, the tool validates variable types, sizes, and ordering. If validation fails, the Plot Selector provides a diagnostic message in its Help pane and does not let you run the plotting function.

In addition to MATLAB plots, the Plot Catalog offers the same set of choices as the Plot Selector. The choices include most types of plots from the following toolboxes (if installed):

• Control System Toolbox™

• Curve Fitting Toolbox™

• DSP System Toolbox™

• Financial Toolbox™

• Image Processing Toolbox™

• Mapping Toolbox™

• Signal Processing Toolbox™

• Statistics Toolbox™

• System Identification Toolbox™

For more information about the Plot Catalog, see Selecting a Graph from the Plot Catalog. For information on the Plot Selector, see Enhanced Plot Selector Simplifies Data Display.

### Creating Graphical User Interfaces (GUIs)

#### Do not Repopulate Menus on the Mac from Inside Their Callbacks

In R2011a, figures display their menus on the Mac screen menubar instead of across the top of figure windows. Prior to R2011a, GUIs could create dynamic menus using callbacks that completely deleted, and then repopulated the contents of menus. But on a Mac, running a GUI with a menu whose callback changes all items in this manner can result in the display of a blank menu (no items). The unexpected behavior only happens when a `uimenu` callback deletes all submenus (child uimenu components) and repopulates the menu with a new set of items at the time the menu opens.

In R2011a, on the Mac platform only, `uimenu` callbacks are no longer able to replace all submenus during menu selection. Note that repopulating some (not all) menu items does not create this issue. However, it is not good programming practice to remove and insert menu items within a menu callback routine.

#### Compatibility Considerations

If you have a `uimenu` callback that repopulates all of its menu items when you open that menu, you must change that code if you want it to work on a Mac. For example, your code might be able to remove and install submenus from outside of the callback that handles the menu. The callback can also rename, disable, hide, and show submenus instead of deleting them and creating new ones. The Mac is the only platform impacted by this incompatibility. Menus on Microsoft Windows, Unix, and Linux continue to behave as they did in previous releases.

#### Functions and Function Elements Being Removed

Function or Function Element NameWhat Happens When You Use the Function or Element?Use This InsteadCompatibility Considerations
`pagesetupdlg`Warns`printpreview``printpreview` provides all functionality and more, except for some unit choices. Update any GUIs that call `pagesetupdlg` to do page setup.

### New Compiler Support

MATLAB Version 7.12 (R2011a) supports these new compilers for building MEX-files:

#### Linux (64- and 32-Bit) Platforms

• GNU gfortran 4.3.x

#### Apple Mac 64-Bit Platforms

• Apple Xcode 3.2 with gcc 4.2.x

### Compiler Support To Be Phased Out

Support for the following compilers will be discontinued in a future release, at which time new versions will be supported. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

#### Microsoft Windows 32-Bit Platforms

• Microsoft Visual Studio 2005 SP1

• Visual C++ 6.0

#### Windows 64-Bit Platforms

• Microsoft Visual Studio 2005 SP1

### Discontinued Compiler Support

MATLAB no longer supports the following compilers:

#### Windows (64- and 32-Bit) Platforms

• Microsoft Visual Studio 2008 (9.0) Express

• Intel Visual Fortran Version 10.1

• GNU g95 0.90

#### Mac 64-Bit Platforms

• Xcode 3.1 with gcc 4.0.1

#### 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 Web page.

#### Changes to Shared Library Compiler Support

In MATLAB Version 7.12 (R2011a), you can use the `loadlibrary` command with any supported compiler. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

#### Compatibility Considerations

You must run `mex` `-setup` before using the `loadlibrary` command. For information about selecting a compiler, see Selecting a Compiler on Windows Platforms or Selecting a Compiler on UNIX Platforms.

### Support for .NET System.Enum Objects

MATLAB exposes .NET enumerations as native .NET classes:

• Support for non-`Int32` underlying types

• Support for bit-wise `bitand`, `bitnot`, `bitor`, and `bitxor` operators

• Support for invocation of `System.Enum` methods, such as the `HasFlag` method in Framework Version 4.0

• Support for comparison and binary operators `eq`, `ne`, `ge`, `gt`, `le`, and `lt` on enumeration types

#### Compatibility Considerations

MATLAB displays an error when you use the `enumeration` command to return arrays of .NET enumeration objects. To read enumeration members into MATLAB arrays, see Refer to a .NET Enumeration Member.

MATLAB enumerations no longer inherit from the MATLAB `int32` class.

You cannot create arrays of .NET enumeration objects. For example, if you type:

`a = [EnumTest.Colors.Red EnumTest.Colors.Blue]`

MATLAB displays:

`??? Array formation and indexing are not allowed on .NET objects.`

To combine members of an enumeration into a MATLAB variable, see Combining Enumerations into a Single MATLAB Variable.

### Support for Asynchronous .NET Delegate Callback Handling

You can use delegates to call a synchronous method asynchronously. See Calling a .NET Method Asynchronously.

Bug Fixes

Bug Fixes

## R2010b

New Features, Bug Fixes, Compatibility Considerations

### Desktop Tools and Development Environment

#### Desktop

New desktop features and changes introduced in Version 7.11 (R2010b) are:

### Ability to Customize the Date Format

You can now customize the date format that the Current Folder browser and the Command History window use to display dates, such as the dates indicated here:

Previously, the date format in both of these tools was M/d/yy (for instance, 6/4/90 for June 4, 1990) and you could not change it. Now, both tools use the operating system short date format. For details, see Customizing the Column Display.

### Keyboard Shortcuts Preferences Integrated with File Exchange

MATLAB now integrates keyboard shortcuts preferences with File Exchange. You can access File Exchange directly from the Keyboard Shortcuts Preferences panel and find:

• MATLAB keyboard shortcuts available in Version 7.9 (R2009a) and earlier releases

• Keyboard shortcuts sets created by other MATLAB users

For details, see Download Keyboard Shortcut Settings Files from File Exchange .

### MATLAB Provides Enumeration Template

MATLAB provides a template for classes that define enumerations. Enumeration classes enable you to define a fixed set of names representing a particular type of value. Choose File > New > Enumeration. For more information, see Enumerations.

### New Language Preference for Help Browser

If your system displays documentation in Japanese, you can use the Language panel in the Help Preferences dialog to instruct the Help browser to display documentation in English instead of Japanese. You can toggle between languages with the preference panel, enabling you to revert to Japanese at any time. The option changes the language used in the Help Browser and for GUI context-sensitive help, but it does not affect the language appearing in menus or elsewhere in products.

For example, the `help` command still provides help in Japanese after you switch the Help browser to English. The Language preference is available only when the system locale is Japanese and the Japanese documentation is installed. If the documentation for a product is not translated, the Help Browser displays the English documentation for it no matter how you set the preference.

### Accessing Product Documentation in Japanese

MathWorks usually provides Japanese translations of product documentation about 2 months after new versions of products first ship. When you install the new version of a product, the previous version of translated documentation is installed in most cases.

To read the most current documentation for your release, switch the Help browser to English. After the translations of the latest documentation are available, you can download and install them in your products. At that time, you can find a link to download the latest translated documentation on the Japanese documentation start page.

#### Managing Files

New features and changes introduced in Version 7.11 (R2010b) are:

### Ability to View Zip File Contents in Current Folder Browser

Using the Current Folder browser, you can now view the files in a zip file without having to extract them. This feature enables you to:

• Confirm the contents of a newly created zip file

• Selectively open items from a zip file

• Add or remove files from the zip file

For details, see Creating and Managing Zip File Archives or watch the Zip File Browsing video demo.

### Details Panel of Current Folder Provides Preview of Graphic Files

Now, when you select a `JPEG`, `JPG`, `BMP`, `WBMP`, `PNG`, or `GIF` image in the Current Folder browser, the Details panel displays a thumbnail of the image and lists its width and height in pixels. For more information, see Viewing File Details Without Opening Files or watch the File Preview Enhancements video demo.

### Current Folder Browser Indicates Whether File Is Modified in Editor

Now, if you modify a file in the Editor, but have not yet saved the changes, the Current Folder browser indicates the file state. An asterisk (*) appears next to the name of such a file in the Current Folder browser. In addition, when you select such a file in the Current Folder browser, the detail panel reflects the modified file, not the file saved on disk. This feature is useful when you are creating zip files and want to be sure that all files included in the archive are saved and up-to-date. For details see, Viewing File Details Without Opening Files or watch the File Preview Enhancements video demo.

### Compare Zip Files and Folders

You can now compare any combinations of zip files, folders, and Simulink Manifests with the Comparison Tool. Right-click files or folders in the Current Folder browser and choose Compare Selected Files/Folders, or Compare Against > Choose.

For details, see Comparing Folders and Zip Files.

### Enhanced Comparison Tool

The Comparison Tool now provides the following capabilities:

• Select what type of comparison to run from a list of possible comparison options, e.g., text, binary or XML comparison.

• Enhanced MAT-file comparisons now include size, data type and change summary.

• New option to ignore whitespace changes in text comparisons.

For details, see Comparing Files and Folders.

#### Editing and Debugging MATLAB Code

New Desktop features and changes introduced in Version 7.11 (R2010b) are:

### Ability to Save File to Backup Without Closing That File

You now can save a file that is open in the Editor to a backup file. Select File > Save Backup, and then specify a backup file name. The file that is active in the Editor when you perform the save operation remains active. If changes to the active file prove problematic, you can use the backup file to return to a known state or to compare with the active file. This comparison can help you determine where errors exist.

For information on other save options, see Save Files.

### Enhanced Comment Wrapping

The enhanced ability to wrap MATLAB comments includes:

• Wrapping an entire block of comments by selecting File > Wrap Comments.

There is no need to select the block of comments first. For details see Wrap Comments Manually.

• Specifying where you want column counting to begin.

For example, if you indent comments, you can specify that you want the maximum width of comments to be 75 columns from the start of a comment, rather than from the start of a line. To set Comment formatting preferences, select File > Preferences > Editor/Debugger > Language.

### Variable and Function Highlighting

The Editor now presents variables that are not local variables in a teal blue color, by default. Also by default, when you click a function or local variable, the Editor highlights it and all other references to it in a sky blue color. As demonstrated in the Variable and Subfunction Highlighting video demo, this feature makes it easier to:

To disable or change the colors that the Editor uses for variable and function highlighting, see Use Automatic Function and Variable Highlighting.

### Options for Setting Current Folder and Search Path Available from Editor Context Menu

When multiple documents are open and docked in the Editor, you can right-click the document tab, and then from the context menu choose:

• Change Current Folder to folder-name

• Add folder-name to Search Path or Remove folder-name from Search Path, respectively

• Locate on Disk

This option locates the document in your operating system file browser. It is not available on Linux platforms.

• Copy Full Path to Clipboard

### Open As Text Option

You can use the File > Open as Text option to open a file in the Editor as a text file, even if the file type is associated with another application or tool. This feature is useful, for example, if you import a tab-delimited data file (`.dat`) into the workspace, and then you find you want to add a data point. For details, see Open Existing Files.

### Mathematics

#### New Utility Functions: isrow, iscolumn, ismatrix

New functions `isrow`, `iscolumn`, and `ismatrix` provide basic information about inputs.

#### Output Option for Point Distances in DelaunayTri/nearestNeighbor Method

The two-output form of `DelaunayTri/nearestNeighbor` returns the corresponding Euclidean distances between the query points and their nearest neighbors.

#### Changes to convhull and delaunay Functions

The functions `convhull` and `delaunay` now support 3-D input in either multiple vector or multicolumn matrix format. In addition, the `simplify` option for `convhull` provides the option of removing vertices that do not contribute to the area or volume of the convex hull.

#### Functions Being Removed

Function NameWhat Happens When You Use This FunctionUse This Function InsteadCompatibility Considerations
`bessel`Warns`besselj`Replace all instances of `bessel` with `besselj`.
`erfcore`Errors`erf`, `erfc`, `erfcx`, `erfinv`, or `erfcinv`See the function reference pages for the individual functions.
`intwarning`ErrorsNoneRemove all instances of `intwarning` from your code.

#### optimset Errors for Optimization Toolbox Options

If you do not have an Optimization Toolbox™ license, and you set an `optimset` option for a solver that is only available in Optimization Toolbox, `optimset` errors. Previously, `optimset` would warn, not error, and ignore the option.

#### Compatibility Considerations

Change your code to set only those options that apply to your solver: `fminbnd`, `fminsearch`, `fzero`, or `lsqnonneg`.

#### atan Warning Being Removed

When you use `atan(1i)` and `atan(-1i)` you no longer get a warning.

#### Compatibility Considerations

Remove instances of the warning ID `MATLAB:atan:singularity` from your code.

### Data Analysis

#### Arrays of Time Series Objects Supported

MATLAB now enables you to create arrays of `timeseries` objects. In Version 7.10 (R2010a) and before, `timeseries` objects behaved as arrays, but some array behavior was overridden.

#### Compatibility Considerations

 Note:   It is likely that this change is important to you only if you write code that uses `timeseries` objects.

In Version 7.11 (R2010b), all of the overridden behaviors for the functions listed in the table that follows are removed. The behavior of these functions on `timeseries` objects is the built-in behavior for arrays of objects. Think of a `timeseries` object as a single object that you can concatenate into an array of objects. Do not think of each `timeseries` itself as an array.

### Functions Being Modified

Function or Function Element NameWhat Happens When You Use the Function or Element?Use This InsteadCompatibility Considerations
`horzcat`No error or warning

Not applicable

You can now use `horzcat` with `timeseries` objects.
`isempty (timeseries)`No error or warning

`timeseries.Length==0 `

Replace code such as:
`isempty(ts)`
with:
`ts.Length == 0`

`length (timeseries)`No error or warning

`timeseries.Length ` property

Replace code such as:
`length(ts)`
with:
`ts.Length`

`size (timeseries)`No error or warning

`[timeseries.Length 1] `

Replace code such as:
`size(ts)`
with:
`[ts.Length 1]`

`subsref`No error or warning

`getsamples`

Replace code such as:
`t3 = t1(1:3);`
with:
`getsamples(t1,1:3);`

`vertcat (timeseries)`May return `Index exceeds matrix dimension` error

`append`

Replace code such as:
`t3 = [t1;t2];`
with
`t3 = append(t1,t2);`

### Example of timeseries Object Concatenation

Suppose you concatenate the following two `timeseries` objects:

``` t1 = timeseries(ones(5,1),0:4); t2 = timeseries(zeros(5,1),5:9);```
In R2010a, the following syntax created a single `timeseries` object, `t3`, with 10 samples spanning the time range 0-9. The first 5 samples derived from `t1` and the last 5 samples derived from `t2`. The size of the `timeseries`, `t3`, was `[10 1]` and its length was 10, because `t3` has 10 samples.

```t3 = [t1;t2] t3 = vertcat(t1,t2)```

Now, the same syntax creates a 2x1 array comprising the two `timeseries` objects `t1` and `t2`. Its size is `[2 1]`, and its length is 2 because the array has two rows, each a single `timeseries`.

### Programming

#### arrayfun Accepts Array of Objects

The `arrayfun` function now accepts an array of objects as an input. The output can also be a scalar object, as long as the `UniformOutput` flag is set to `false`.

#### Comparing Object Arrays that Contain NaNs

In previous versions of MATLAB, calling `isequalwithequalnans` to compare identical arrays of objects that contain one or more NaN (Not a Number) values incorrectly returned `false`. Similarly, calling `isequal` to compare identical arrays of objects that contain NaNs incorrectly returned `true`.

In MATLAB version 7.11, these functions return the expected values (`true` for `isequalwithequalnans`, and `false` for `isequal`) when used to compare object arrays.

#### Compatibility Considerations

Program code that compares object arrays that may contain NaNs should be examined to ensure correct behavior.

#### Functions isa and islogical Now Consistent for Objects

In earlier releases of MATLAB, the following statements returned different results for objects with a base class of `logical`:

```isa(obj, 'logical') islogical(obj)```

In MATLAB version 7.11, both of these statements return `true` if the class of `obj` is derived from `logical`, and `false` otherwise.

#### Compatibility Considerations

If you have program code that calls either `isa` or `islogical` on objects with a base class of logical, it is advisable to verify that this new behavior does not adversely affect the execution of the program.

#### New Enumeration Classes

MATLAB provides support for classes that define enumerations. Enumeration classes enable you to define a fixed set of names representing a particular type of value. See Enumerations for more information.

Use this link to watch a video that introduces enumerations: Play demo

#### New Functionality for Writing Video Files

The new `VideoWriter` function allows you to create AVI files on all platforms. As an improvement over the `avifile` function, `VideoWriter` can create files larger than 2 GB. For more information, watch this video demo or see the `VideoWriter` reference page.

For consistency with the new `VideoWriter` class, the `mmreader` class is now called `VideoReader`. A new function, `VideoReader`, replaces the `mmreader` function. `VideoReader` and `mmreader` return identical `VideoReader` objects for the same input file.

#### Compatibility Considerations

Replace all instances of `mmreader` with `VideoReader`. The two functions use identical syntax. When requesting help or documentation for methods from the command line, or calling a static method such as `getFileFormats`, use the new `VideoReader` class name (such as `doc VideoReader/read`). You do not need to change any calls to the `read`, `get`, or `set` methods.

Previously, the R2010a Release Notes recommended replacing instances of `aviinfo` with `mmreader` and `get`, and instances of `aviread` with `mmreader` and `read`. Instead, replace `aviinfo` with `VideoReader `and `get`, and replace `aviread` with `VideoReader` and `read`.

#### New HDF4 Functions

The MATLAB interface to the grid functions in the HDF-EOS C library, `hdfgd`, now includes three new syntaxes. These syntaxes convert grid coordinates to longitude and latitude values.

• `ij2ll`

• `ll2ij`

• `rs2ll`

To view the help for these functions, use the `help` command at the MATLAB prompt, as in the following example:

`help hdfgd`

#### New HDF5 Low-Level Functions

The MATLAB interfaces to the HDF5 C library now include the following new functions.

• `H5A.open_by_idx`

• `H5A.open_by_name`

• `H5D.get_access_plist`

• `H5I.is_valid `

• `H5L.copy `

• `H5L.get_name_by_idx`

• `H5P.set_chunk_cache`

• `H5P.get_chunk_cache `

• `H5P.set_copy_object`

• `H5P.get_copy_object`

To view the help for these functions, use the `help` command at the MATLAB prompt, as in the following example:

`help H5P.get_copy_object`

#### New netCDF Functions

The MATLAB interface to the netCDF C library now includes the following new functions.

• `netcdf.inqFormat`

• `netcdf.inqUnlimDims`

• `netcdf.defGrp`

• `netcdf.inqNcid `

• `netcdf.inqGrps`

• `netcdf.inqVarIDs`

• `netcdf.inqDimIDs`

• `netcdf.inqGrpName`

• `netcdf.inqGrpNameFull`

• `netcdf.inqGrpParent`

• `netcdf.defVarChunking`

• `netcdf.defVarDeflate`

• `netcdf.defVarFill `

• `netcdf.defVarFletcher32`

• `netcdf.inqVarChunking`

• `netcdf.inqVarDeflate`

• `netcdf.inqVarFill`

• `netcdf.inqVarFletcher32`

To view the help for these functions, use the `help` command at the MATLAB prompt, as in the following example:

`help netcdf.inqVarFletcher32 `

#### Upgrades to Scientific File Format Libraries

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

netCDF3.6.2 to 4.0.1

#### New Examples in Command Line Help

The MATLAB command line help for the HDF5, netCDF, and CDF low-level functions now includes hundreds of new examples.

#### imread and imwrite Can Now Handle N-channel J2C JPEG 2000 Files

You can now use the `imread` and `imwrite` functions with n-channel J2C JPEG 2000 files.

J2C files are raw JPEG2000 codestreams that usually have the file extension `.j2c` or `.j2k`. J2C files don't contain color space, color palette, capture resolution, display resolution and vender specific information.

In previous releases, if you use `imread` to read a 4-channel J2C file, you receive a warning that some channels may be ignored and `imread` returns a 3-channel image. Now, `imread` returns a 4-channel image and does not issue a warning.

If you try to write a 4-channel J2C file in previous releases, `imwrite` issues an error. In this release, `imwrite` creates the 4-channel J2C file.

#### csvread and csvwrite Will Not Be Removed

The R2010a Release Notes originally stated that `csvread` and `csvwrite` would be removed in a future release. As of R2010b, there are no plans to remove these functions.

#### sprintf and fprintf Print Null Characters in Strings

In previous releases, calls to `sprintf` or `fprintf` that printed strings using the `%s` qualifier prematurely terminated strings that contained null characters. For example, this code

`sprintf('%s', ['foo' 0 'bar'])`

returned

```ans = foo```

The same code now returns

```ans = foo bar```

#### Compatibility Considerations

If you do not want to print the entire contents of strings that contain null characters, test the string for these characters (for example, using the `isstrprop` function).

#### Functions and Function Elements Being Removed

Function or Function Element NameWhat Happens When You Use the Function or Element?Use This InsteadCompatibility Considerations
`fileparts` return argument 4 (file version)Warns, returns empty fourth argumentNo alternative; file versions are unsupportedCall `fileparts` with three return arguments: ```[path_name file_name file_extension]```
`mmreader`Still runs, creates a `VideoReader` object`VideoReader`Replace all existing instances of `mmreader` with `VideoReader`.
`wavplay`Still runs`audioplayer` and `play`Replace all existing instances of `wavplay` with `audioplayer` and `play`.
`wavrecord`Still runs`audiorecorder` and `record`Replace all existing instances of `wavrecord` with `audiorecorder` and `record`.
`wk1finfo`Warns Remove all instances of `wk1finfo`. Get information about Excel spreadsheets with `xlsfinfo`.
`wk1read`Warns Remove all instances of `wk1read`. Read Excel spreadsheets with `xlsread`.
`wk1write`Warns Remove all instances of `wk1write`. Write to Excel spreadsheets with `xlswrite`.

#### MATLAB Did Not Pass struct to loadobj When Property Was Deleted

If you save an object having a property value equal to the property's default value, and then that property is removed from the class definition, MATLAB did not detect the fact that the property was missing. In this case, MATLAB did not build a `struct` to pass to `loadobj`. MATLAB now returns a `struct` in this case.

#### Compatibility Considerations

If you rely on the following situation not returning a `struct` to `loadobj`, you need to update your code:

• You saved an object using the `save` command

• This object had a property that was set to the default value defined by the class at the time of saving

• he property set to its default value at save time is subsequently removed from the class definition

• You load the property and expect the load operation to return an object (it should return a `struct` because the class definition has changed in a way the load cannot create the object).

• Your `loadobj` method is not prepared to use the returned `struct` to create an object

You must implement a `loadobj` method to recreate the object using the current class definition.

### Graphics and 3-D Visualization

#### Print –dmfile and printdmfile Issue Deprecation Warnings

The `–dmfile` `print` command option and the `printdmfile` function now issue a deprecation warning. Both option and function will be removed in a subsequent release. The `–dmfile` option and the `printdmfile` function were used by GUIDE.

#### Compatibility Considerations

Remove any use of `print –dmfile` or `printdmfile` from your code.

#### The saveas 'mmat' option Issues a Deprecation Warning

The `saveas` function now issues a deprecation warning if you use the `'mmat'` format option. This option will be removed in a subsequent release. This option was used with GUIDE.

#### Compatibility Considerations

Remove any use of the `mmat` option with `saveas` from your code.

#### The movie Function is No Longer a Built-in Function

The `movie` function is no longer a built-in function. Therefore, you cannot call `movie` from the `builtin` function. `movie` syntax remains the same.

#### Compatibility Considerations

Remove any use of the `builtin` function to call the `movie` function from your code.

### Creating Graphical User Interfaces (GUIs)

#### Functions and Function Elements Being Removed

The `uitabgroup` and `uitab` GUI components are undocumented features that provide tabbed panels to GUIs that you create programmatically. The current method of calling these functions and some of their properties will change in a future release. MathWorks has never supported their use. However, if your MATLAB code includes these functions, read the following information:

Function or Function Element NameWhat Happens When You Use the Function or Element?Use This InsteadCompatibility Considerations
`uitabgroup('v0',...)`
`uitab('v0',...)`
Warns`uitabgroup(...)`
`uitab(...)`
Using the `'v0'` argument generates a warning, but the object is created.
`uitabgroup` property `SelectionChangeFcn`Not recommended`SelectionChangeCallback`Event data for the callback is still a struct with fields `OldValue` and `NewValue` but those values are now `uitab` handles, not `uitab` indexes.
`uitabgroup` property `SelectedIndex`Not recommended`SelectedTab`Both properties still exist, but replace instances of `SelectedIndex` (an integer tab index) with `SelectedTab` (a handle to a `uitab` object).
`uitabgroup` property `BackgroundColor`Not recommendedno replacement`uitabgroup` now uses the default `uicontrol` background color.
`uitabgroup` event `SelectionChanged`Errors`SelectionChange` eventEvent name changed to be consistent with other components. Event data is still a struct with fields `OldValue` and `NewValue` but those values are now `uitab` handles, not `uitab` indexes.

You should update any code that you maintain which uses the undocumented `uitabgroup` and `uitab` functions to conform to the new standards, as described in the uitab and uitabgroup Migration Document. Existing code for these functions is unlikely to work in R2010b going forward.

### New Compiler Support

MATLAB Version 7.11 (R2010b) supports these new compilers for building MEX-files:

#### Microsoft Windows (64- and 32-Bit) Platforms

• Microsoft Visual Studio 2010 (10.0) Professional

• Microsoft Visual Studio 2010 (10.0) Express

#### Linux (64- and 32-Bit) Platforms

• GNU gcc Version 4.3.x

### Compiler Support to Be Phased Out

Support for the following compilers will be discontinued in a future release, at which time new versions will be supported. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

#### Windows (64- and 32-Bit) Platforms

• Intel Visual Fortran Version 10.1

• Microsoft Visual Studio 2005 SP1

### Discontinued Compiler Support

MATLAB no longer supports the following compilers:

#### Windows (64- and 32-Bit) Platforms

• Intel C++ Version 9.1

#### Linux (64- and 32-Bit) Platforms

• GNU gcc Version 4.2.3

#### Apple Macintosh (32-Bit) Platforms

• Apple Xcode 3.1 (gcc / g++ Version 4.0.1)

• GNU gfortran Version 4.2.2

#### 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 Web page.

#### -largeArrayDims Option to MEX Will Become Default in Next Release of MATLAB

In the next release of MATLAB, the `mex` command will change to use the large-array-handling API by default. This means the `-largeArrayDims` option will become the default.

You do not need to make changes to build and run MEX-files with MATLAB Version 7.11 (R2010b).

#### Compatibility Considerations

Source for MEX-files built on 64-bit platforms must be updated in order to successfully build and run with the next release of MATLAB. Review your source MEX-files and `mex` build scripts. For information about migrating your MEX-files to use the large-array-handling API, see Upgrading MEX-Files to Use 64-Bit API.

#### MEX Function -argcheck Option Removed

Function Option Name What Happens When you use the Option? Compatibility Considerations

`mex` `-argcheck` option

Errors

Remove all existing instances of `-argcheck` in build scripts.

The `-argcheck` option was a strategy for identifying memory corruption caused by a MEX-file. When you understand the likely causes of memory corruption, you can take preventative measures in your code or use your debugger to identify the source of errors.

If a binary MEX-file causes a segmentation violation or assertion, it means the MEX-file attempted to access protected, read-only, or unallocated memory.

These types of programming errors are sometimes difficult to track down. Segmentation violations do not always occur at the same point as the logical errors that cause them. If a program writes data to an unintended section of memory, an error might not occur until the program reads and interprets the corrupted data. Consequently, a segmentation violation can occur after the MEX-file finishes executing.

One cause of memory corruption is to pass a null pointer to a function. To check for this condition, add code in your MEX-file to check for invalid arguments to MEX Library and MX Matrix Library API functions.

To troubleshoot problems of this nature, run MATLAB within a debugging environment. For more information, see Debugging C/C++ Language MEX-Files or Debugging Fortran Source MEX-Files.

#### MEX Function -inline Option Removed

Function Option Name What Happens When you use the Option? Compatibility Considerations

`mex` `-inline` option

Errors

Remove all existing instances of `-inline` in build scripts.

MATLAB supports:

#### New COM Data Type Support

Support for the following COM data type has been added. See Handling COM Data in MATLAB Software for a description of supported data types.

• `VT_I8````signed int64```

• `VT_UI8````unsigned int64```

• Unsigned integer

## R2010a

New Features, Bug Fixes, Compatibility Considerations

### Desktop Tools and Development Environment

#### Desktop New Features Video for R2010a

For an overview of the major new features in the MATLAB Desktop Tools and Development Environment area, watch this video demo.

### AUTOMOUNT_MAP Environment Variable No Longer Used by MATLAB

On UNIX systems, MATLAB no longer uses the `AUTOMOUNT_MAP` environment variable, the path prefix map for automounting. Previously, MATLAB set the value of the variable in `.matlab7.rc`, but you could override this setting using the `AUTOMOUNT_MAP` environment variable.

#### Desktop

New Desktop features and changes introduced in Version 7.10 (R2010a) are:

### Enhancements for Managing Keyboard Shortcuts

Keyboard shortcuts now provide the following:

#### Ability to List a Set of Keyboard Shortcuts in a Text Editor

You can now list all of the keyboard shortcuts for a given set in a text editor. For details, see List All Keyboard Shortcuts in a Set.

#### Ability to Remove Keyboard Shortcuts Sets

You can now remove keyboard shortcut sets that you created or imported. For details, see Delete a Set of Keyboard Shortcuts.

#### Ability to Compare Sets of Keyboard Shortcuts

You can now compare one set of keyboard shortcuts to another. This enables you, for example, to see what is different between the current Windows default keyboard shortcuts and those that were the defaults in MATLAB Version 7.8 (R2009a) and earlier. For details, see Compare Sets of Keyboard Shortcuts.

### Method for Accessing M-Lint Preferences and the M-Lint Report

The M-Lint Preferences is now renamed the Code Analyzer Preference. Therefore, to set preferences for analyzing MATLAB code, select File > Preferences > Code Analyzer. Similarly, the M-Lint Report is now renamed the Code Analyzer Report. To access this report, click the Actions button in the Current Folder browser, and then select Reports > Code Analyzer Report. The names of the `mlint` and `mlintrpt` functions are unchanged.

### Preference for Java Heap Memory

A new preference setting allows you to adjust the amount of memory that MATLAB allocates for storing Java objects. Insufficient memory for these objects results in `OutOfMemory` errors. For more information, see Java Heap Memory Preferences.

#### Compatibility Considerations

Technical Solution 1-18I2C specifies a procedure for creating a text file named `java.opts` to set the Java heap size. Do not use both the new MATLAB preference and a `java.opts` file to adjust the heap size.

#### Help Browser

For a demonstration of previous enhancements to the Help browser, watch the Help Browser Enhancements video.

### Improved Instructions and Examples for Adding Help and Demos to the Help Browser

The MATLAB documentation now includes more details about how to display your own HTML help and demos. In particular, the documentation clarifies procedures for setting up files and folders and provides three new XML file templates that you can inspect, copy, and modify.

The documentation also adds a new complete working example, called the Upslope Area Toolbox. Documentation for the toolbox includes a getting started guide, user guide, function reference pages, and release notes. The documentation set is generated entirely from MATLAB script files (also provided), using the `publish` command. The example folder includes all program files for the toolbox. However, certain routines require Image Processing Toolbox for full functionality.

You can also find the Upslope Area Toolbox on the MATLAB Central File Exchange. For more information about techniques and algorithms the toolbox uses, see the set of articles about it on this MATLAB Central blog: http://blogs.mathworks.com/steve/category/upslope-area.

Find the updated documentation in Create Help and Demos. For details, XML templates, and examples, see these subsections:

You can view the Upslope Toolbox documentation example in the Help browser now by clicking here, which places its folder on the search path.

### New Search Hints

The Help Browser now provides suggestions for search terms as you type in the search field. These hints save you time and can suggest words and phrases you might not have thought of but that can be useful in making a search. The hints display as a drop-down menu that changes its contents as you type. The following illustration shows the appearance of the menu.

### Search History Persists Between Sessions

The Help browser can now recall searches you have made across MATLAB sessions. Your search history and search hints display as separate lists in a drop-down pane as you type in the search field. Select Show Search History from the pop-up menu to the right of the search field, or press the down arrow key in the search field when it is empty. The following illustration shows search history and search hints as they appear when you enter search terms.

### Hide Search Results Previews

You can now choose not to see the one-line descriptions of search results called previews. To toggle all previews off, right-click in the Search Results pane of the Help Navigator and choose Hide Previews. The search results listing is smaller so you can scan it quickly when you hide previews. To see previews again, right-click in the Search Results pane, and choose Show Previews.

### docopt Function Removed

This release obsoletes the `docopt` function, which specified which system Web browser to use on UNIX platforms. This function has been removed. You can instead specify a default system browser in your preferences. For more information, see New System Browser Preference Instead of docopt.m for MATLAB on UNIX Platforms.

#### Compatibility Considerations

If you call `doctopt` in your startup file or some other program file, remove the call to avoid receiving an error.

### Create and Expand Zipped Archives from Current Folder Browser

Effective this release, the capability to create and expand, and archive `.zip` files has been added to the Current Folder browser. Select files and folders in the Current Folder browser, then right click, and choose Create Zip File to create an archive. The archive appears in the current folder. You can expand an archive in the same way. For details, see Creating and Managing Zip File Archives.

### Visual Aids for Identifying Files Inaccessible to MATLAB

This release changes the default behavior of the Current Folder browser. The Current Folder browser now dims files that are inaccessible to MATLAB to indicate their unavailability. A tooltip provides an explanation.

You can also customize or disable this feature. For more information, see Preferences for the Current Folder Browser and Viewing Files and Folders on the Search Path.

### Ability to Remove Folders and Subfolders from the Path Using the Current Folder Browser

You can now remove folders from the MATLAB path as follows:

1. In the Current Folder browser, right-click the folder you want to remove from the path.

2. From the context menu, select Remove from Path, and then select Selected Folders or Selected Folder and Subfolders.

If the default preferences for the Current Folder Path indication option are set, the folders you removed now appear dimmed in the Current Folder browser. For more information, see Preferences for the Current Folder Browser and Removing Folders from the Search Path.

### Enhancements for File and Folder Comparisons

This release enhances the File and Folder Comparisons tool to improve the usability of comparisons between text files and folders.

File comparisons now highlight changes within lines and provide new toolbar buttons for stepping through differences, as the following figure shows.

Folder comparisons now provides results that are sortable by name, type, size, timestamp, or change summary. Click column headers to sort the table. Click compare links to explore differences between files and folders. The following example shows results sorted by Type.

When you compare subfolders with many files, now the tool continues analysis in the background, reporting progress. You can now skip items or cancel as you review this analysis.

#### Editing and Debugging MATLAB Code

New features and changes introduced in Version 7.10 (R2010a) are:

### Tab Completion for Local Variables and Functions

The MATLAB Editor now supports tab completion for local variable and subfunction names within MATLAB program files. For more information, see Complete Names in the Editor Using the Tab Key.

### Toolbar Buttons for Stepping Through Code Cells Without Evaluating Code

This release provides two New Cell Mode toolbar buttons, Next Cell and Previous Cell . You can use these buttons to step through cells in the Editor without evaluating the code within the cells. By default, these buttons do not appear on the Cell Mode toolbar.

### Mathematics

MATLAB's new multithreading capability now includes:

#### Performance Improvements

MATLAB features significant performance improvements for:

#### Changes To qr

The factorization routine in `qr` produces an upper triangular matrix, `R`. Now this matrix always contains real and nonnegative diagonal elements. In previous releases, the diagonal of `R` could contain complex and negative elements.

#### Compatibility Considerations

`R` now contains only real, nonnegative diagonal elements. The `QR` factorization is not unique, so the answer is still correct.

#### Change in Indexing for Sparse Matrix Input

Now subscripted reference into a sparse matrix always returns a sparse matrix. In previous versions of MATLAB, using a double scalar to index into a sparse matrix resulted in full scalar output.

#### Compatibility Considerations

Scalars extricated from sparse matrices are no longer full. If you previously used the output with a function that does not support sparse input, you now need to update your code. For a list of the functions that do not support sparse matrices, see Functions That Do Not Support Sparse Matrices in the MATLAB Mathematics documentation.

#### Improved Error Checking for Sparse Functions

Functions that erroneously accepted N-D arrays and returned reshaped sparse 2-D outputs no longer accept full N-D inputs and now return an error. The functions affected are:

Also, binary functions that formerly accepted both full N-D inputs along with sparse 2-D inputs and warned about the reshape, now return an error. For example, `ones(2,2,2).*sparse(3)` formerly returned a sparse 2-by-4 matrix along with a warning about the reshape. This code now returns an error.

#### Computational Geometry Functions Being Changed

The computational geometry functions `delaunay`, `convhull`, `griddata`, `voronoi`, `delaunay3`, `griddata3` no longer use the `options` arguments.

#### Compatibility Considerations

Use of the `options` arguments to `delaunay`, `convhull`, `griddata`, and `voronoi` now throws a warning.

#### Computational Geometry Functions Being Removed

The functions `griddata3`, `delaunay3`, `dsearch`, `tsearch` will be removed in a future release. Use of these functions now throws a warning.

`griddata3``TriScatteredInterp`
`dsearch``DelaunayTri/nearestNeighbor`
`tsearch``DelaunayTri/pointLocation`
`delaunay3``DelaunayTri`

#### Compatibility Considerations

Update your code to use the `DelaunayTri` and `TriScatteredInterp` computational geometry classes .

#### lsqnonneg No Longer Uses Optional Starting Point Input

The `lsqnonneg` solver no longer uses the optional input `x0` as a starting point.

#### Compatibility Considerations

If you give a starting point `x0`, MATLAB issues a warning. Also, `lsqnonneg` ignores `x0`, and instead uses a starting point of a vector of zeros.

#### Function erfcore Removed

Support for the `erfcore` function has been removed. Use of `erfcore` now results in the following error message:

```ERFCORE will be removed in a future release. Use ERF, ERFC, ERFCX, ERFINV, or ERFCINV instead. ```

#### Compatibility Considerations

Replace `erfcore` with `erf`, `erfc`, `erfcx`, `erfinv`, or `erfcinv`. See the function reference pages for the individual error functions.

#### Integer Warning Messages Removed

These warning messages for integer math and conversion have been removed:

• `MATLAB:intConvertNaN`

• `MATLAB:intConvertNonIntVal`

• `MATLAB:intConvertOverflow`

• `MATLAB:intMathOverflow`

#### Compatibility Considerations

The warning messages for integer math and conversion are no longer available. Remove these warning IDs from your code.

#### Function intwarning Being Removed

The `intwarning` function will be removed in a future release. Use of `intwarning` now throws a warning:

```Warning: All four integer warnings are removed. INTWARNING will be removed in a future release. ```

#### Compatibility Considerations

The warnings previously thrown when you used `intwarning` on are now removed. Remove all instances of `intwarning` from your code.

#### atan Warning Being Removed

The warning thrown when you use `atan(i)` and `atan(-i)` will be removed. Currently, the warning message is:

```Warning: Singularity in ATAN. This warning will be removed in a future release.Consider using DBSTOP IF NANINF when debugging. ```

#### Compatibility Considerations

Remove instances of the warning ID `MATLAB:atan:singularity` from your code.

#### nextpow2 Returns Output the Same Size As Input

In previous releases, `nextpow2` with a vector input `v` returned `nextpow2(length(v))`. Now `nextpow2(v)` returns a vector the same size as the input.

#### Compatibility Considerations

If you require the old behavior, replace instances of `nextpow2` with `nextpow2(length(v))`.

#### Math Libraries Not Available to Build MEX-Files with Compaq Visual Fortran

MATLAB no longer provides the `libdflapack.dll` and `libdfblas.dll` math libraries for building Fortran MEX-files with a Compaq® Visual Fortran compiler.

#### Compatibility Considerations

If you distribute MEX-files that call BLAS or LAPACK functions built on a Compaq Visual Fortran compiler, you must also distribute the `libdflapack.dll` and `libdfblas.dll` library files.

If MATLAB displays errors when loading a MEX-file and the Dependency Walker indicates missing `libdflapack.dll` and/or `libdfblas.dll` libraries, contact the MEX-file vendor for copies of the libraries. The third-party product, Dependency Walker, is available from the Web site `http://www.dependencywalker.com/`.

### Data Analysis

#### Operations on Timeseries Objects Sometimes Warn About the isTimeFirst Property

In a future release, the `timeseries` Boolean property `isTimeFirst` will behave differently. If the value is `true`, this property indicates that the time vector is the first dimension of a time series. If the value is `false`, the time vector is the last dimension of a time series. In this release, you receive a warning that certain settings of `isTimeFirst` will not be valid in a future release. The warning indicates that for 3-D or N-D data, time must be the last dimension, while 2-D time series data can have time as the first dimension.

#### Compatibility Considerations

You can receive a warning when:

• Constructing a time series object with three or more dimensions without specifying a time vector. In a future release, MATLAB will calculate a value of the `isTimeFirst` property that can differ from the value it currently calculates.

• Changing the `data` of a time series to data of a different dimensionality. In a future release MATLAB will calculate a value of the `isTimeFirst` property that differs from the value it currently calculates.

• Directly setting the `isTimeFirst` property for a time series to a value that will be invalid in a future release.

The warning does not affect how you can use time series data in this release. It is intended to inform you that the behavior of `isTimeFirst` will change in a future release. If you receive a warning about `isTimeFirst`, you can use the `timeseries` method `migrateistimefirst` to correct the problem. For information type

`help timeseries/migrateistimefirst`
in the Command Window.

#### Time Series Time Vectors Can Now Contain Duplicate Sample Times

Starting with this release, a vector containing sample times can have duplicate times in contiguous positions. Previously, time vectors needed to increase monotonically and duplicated time values generated errors. This condition is now relaxed, such that time vectors must be nondecreasing. Interpolation of time series can produce duplicated times if the input to the interpolation method contained duplicate time samples. For more information, see the `timeseries` reference documentation.

### Programming

#### Subscripting Into Function Return Values

If you have a function, such as the following, that returns a struct array:

```function structOut = getStruct structOut = struct('fieldA', 5, 'fieldB', 10);```

it is no longer valid to access fields of the structure by directly dot indexing the function's return value, as shown here:

`getStruct.fieldA`

Instead, you should first assign the returned structure to a variable, and then dot index the variable:

```s = getStruct; s.fieldA ans = 5```

This type of field access has never been allowed within function code, and this change causes scripts and command line statements to be in agreement with function rules.

#### Compatibility Considerations

If you have scripts that employ this type of dot indexing, they will now throw an error. Replace this unsupported style of dot indexing with the style shown above.

#### New Constructor for Map Containers

The following command constructs an empty `containers.Map` object that uses a key type of `kType`, and a value type of `vType`:

`M = containers.Map('KeyType', kType, 'ValueType', vType) `

See the `containers.Map` function reference page for more information.

When creating a function handle inside a method of a class, the function is resolved using the permissions of that method. When MATLAB invokes the function handle, it does so using the permissions of the class. This gives MATLAB the same access as the locations where the function handle was created, including access to private and protected methods accessible to that class.

#### Listing Video File Formats Supported by mmreader

The new `mmreader.getFileFormats` method returns a list of the formats that `mmreader` supports. The list of formats is static for Windows and UNIX systems, but dynamic on Macintosh systems. For more information, see the `getFileFormats` reference page.

#### unzip Preserves Write Attribute of Files

In previous releases, for files archived using WinZip® software, the `unzip` function set the file write attribute of extracted files to read only. Starting with R2010a, `unzip` preserves the original attribute.

MATLAB has included high-level routines for accessing Common Data Format (CDF) files: `cdfread`, `cdfwrite`, and `cdfinfo`. However, the CDF API is so large, these functions cannot satisfy every need. To solve this, MATLAB now includes a new package, called `CDFlib`, that provides access to dozens of the functions in the CDF API. Using these low-level functions, you can create CDF files and populate them with variables and attributes using the CDF library, version 3.3.0.

#### Upgrades to Scientific File Format Libraries

The following table lists upgrades to several scientific file format libraries used by MATLAB.

CDF3.2.1 to 3.3.0
HDF51.8.1 to 1.8.3
HDF44.2.r1 to 4.2.r4
HDF-EOS22.8 to 2.16
PNG1.2.8 to 1.2.39

#### Tiff Class Enhancements

The Tiff class includes the following enhancements.

### Tiff Class Now Excludes Reading OJPEG Format Image Data

You can no longer read YCbCr OJPEG ("old-style" JPEG compression) TIFF images. The Tiff object was not intended to work with OJPEG data but some TIFF files contain data in this format. Reading this data could cause LibTIFF to terminate.

#### Compatibility Considerations

To read OJPEG image data, use the `imread` function. Note that the `imread` function transforms the image data into the RGB colorspace.

The Tiff class includes the following additional capabilities:

• Writing image data that use 16-bit colormaps (palettes)

• Reading and writing `LogL` and `LogLUV` High Dynamic Range (HDR) images. To write a `LogL` or `LogLUV` image, you must use the new `SGILogDataFmt` property.

#### MATLAB Adds Support for Creating JPEG 2000 Files

You can now use the `imwrite` function to create a JPEG 2000 file and write data to the file. The `imwrite` function supports format-specific parameters that let you specify the mode, compression ratio, and other characteristics.

#### Sealed No Longer Listed as meta.property Class Property

While class properties do not have a `Sealed` attribute, the `meta.property` class listed `Sealed` as a property. `Sealed` is no longer listed as a `meta.property` class property.

#### Functions and Function Elements Being Removed

Function or Function Element NameWhat Happens When You Use the Function or Element?Use This InsteadCompatibility Considerations
`aviread`Warns`mmreader` and `read`Replace all existing instances of `aviread` with `mmreader` and `read`.
`aviinfo`Warns`mmreader` and `get`Replace all existing instances of `aviinfo` with `mmreader` and `get`.
`exifread`Warns`imfinfo`Replace all existing instances of `exifread` with `imfinfo`
`fileparts`Still runs, `versn` output is always empty (`''`) Remove all references to a fourth output (`versn`) from `fileparts`.
`intwarning`Warns`warning`If you use `intwarning`, you can implement the same warnings using the `warning` function.
`isstr`Still runs`ischar`Replace all existing instances of `isstr` with `ischar`.
`mmreader.isPlatformSupported`Warns, always returns `true` For a platform-specific list of supported video file formats, use `getFileFormats`.
`setstr`Still runs`char`Replace all existing instances of `setstr` with `char`.
`str2mat`Still runs`char`Replace all existing instances of `str2mat` with `char`.
`strread`Still runs`textscan`Replace 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.
`strvcat`Still runs`char`Replace all existing instances of `strvcat` with `char`. Unlike `strvcat`, the `char` function does not ignore empty strings.
`textread`Still runs`textscan`Replace all existing instances of `textread` with `textscan`, similar to `strread`. Open and close files with `fopen` and `fclose`.
`wk1finfo`Still runs Remove all instances of `wk1finfo`. Get information about Excel spreadsheets with `xlsfinfo`.
`wk1read`Still runs Remove all instances of `wk1read`. Read Excel spreadsheets with `xlsread`.
`wk1write`Still runs Remove all instances of `wk1write`. Write to Excel spreadsheets with `xlswrite`.

### Graphics and 3-D Visualization

#### Plot Selector Supports Additional Toolboxes

The Plot Selector, which was upgraded in Version 7.9 (R2009b), now also generates plots for display functions in the following toolboxes:

• Curve Fitting Toolbox

• DSP System Toolbox

• Image Processing Toolbox

• Signal Processing Toolbox

The Plot Selector continues to support display functions for Control System Toolbox, Financial Toolbox, and Statistics and Machine Learning Toolbox™. You must have installed a toolbox to display data using its plotting functions. For more information about the Plot Selector, see Enhanced Plot Selector Simplifies Data Display.

### New Compiler Support

MATLAB Version 7.10 (R2010a) supports these new compilers for building MEX-files:

#### Windows (32-Bit) Platforms

• Intel C++ Version 11.1

• Intel Visual Fortran Compiler Professional Edition for Windows Version 11.1, installed with Microsoft Visual Studio 2008 Shell. This product is bundled.

• Intel Visual Fortran Compiler Professional Edition for Windows Version 11.1 and Microsoft Visual Studio 2008 SP1 Professional Edition. Separate products.

• Open Watcom Version 1.8

#### Windows (64-Bit) Platforms

• Intel C++ Version 11.1

• Intel Visual Fortran Compiler Professional Edition for Windows Version 11.1, installed with Microsoft Visual Studio 2008 Shell. This product is bundled.

• Intel Visual Fortran Compiler Professional Edition for Windows Version 11.1 and Microsoft Visual Studio 2008 SP1 Professional Edition. Separate products.

### Compiler Support to Be Phased Out

Support for the following compilers will be discontinued in a future release, at which time new versions will be supported. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

#### Windows (32-Bit) Platforms

• Intel Visual Fortran Version 10.1

• Intel C++ Version 9.1

#### Windows (64-Bit) Platforms

• Intel Visual Fortran Version 10.1

• Intel C++ Version 9.1

### Discontinued Compiler Support

MATLAB no longer supports the following compilers:

#### Windows (32-Bit) Platforms

• Open Watcom Version 1.7

• Microsoft Visual Studio .NET 2003 Version 7.1

#### Solaris SPARC (64-Bit) Platforms

• Sun™ Studio 11 cc / CC Version 5.8

• Sun Studio 11 f90 Version 8.2

#### 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 Web page.

#### Changes to Libraries on Linux with Debian Systems

If you run MATLAB Version 7.10 (R2010a) on a Linux with Debian® system, you must use Debian 5, as indicated in System Requirements - Release 2010a.

MEX-files created with MATLAB Version 7.2 (R2006a) or earlier depend on the `libstdc++.so.5` library. Debian 5 does not include this library. MATLAB running on Linux platforms with Debian 5 cannot load these pre-R2006a MEX-files.

#### Compatibility Considerations

You cannot run MEX-files created with MATLAB R2006a or earlier on Linux with Debian 5. Recompile these files on a system with Debian 5.

#### Math Libraries Not Available to Build MEX-Files with Compaq Visual Fortran

MATLAB no longer provides the `libdflapack.dll` and `libdfblas.dll` math libraries for building Fortran MEX-files with a Compaq Visual Fortran compiler.

#### Compatibility Considerations

If you distribute MEX-files that call BLAS or LAPACK functions built on a Compaq Visual Fortran compiler, you must also distribute the `libdflapack.dll` and `libdfblas.dll` library files.

If MATLAB displays errors when loading a MEX-file and the Dependency Walker indicates missing `libdflapack.dll` and/or `libdfblas.dll` libraries, contact the MEX-file vendor for copies of the libraries. The third-party product, Dependency Walker, is available from the Web site `http://www.dependencywalker.com/`.

#### Cannot Create MEX-Files with DLL File Extension

On Windows 32-bit platforms, support for MEX-files with a `.dll` file extension is being phased out. Use the `.mexw32` extension instead.

MATLAB Version 7.10 will continue to execute `.dll` MEX-files, but future versions of MATLAB will not support the `.dll` extension. You can no longer use the `mex` function `-output` switch to create MEX-files with a `.dll` extension. If you enter a command such as:

`mex myfile.c -output newfile.dll`

MATLAB creates the MEX-file `newfile.mexw32` and displays a warning message.

For more information about MEX-files with `.dll` extensions, see Running MEX-Files with .DLL File Extensions on Windows 32-bit Platforms.

#### Compatibility Considerations

Recompile MEX-files with `.dll` file extensions. Update MATLAB scripts or `makefiles` that explicitly specify `.dll` extensions for compiled MEX-files.

If you use MEX-files with a `.dll` extension from a third-party source, contact that vendor to get a recompiled version, referring to these release notes.

#### -largeArrayDims Option to MEX Will Become Default in Next Release of MATLAB

In the next release of MATLAB, the default `mex` command will change to use the large-array-handling API. This means the `-largeArrayDims` option will become the default.

You do not need to make changes to build and run MEX-files with MATLAB Version 7.10 (R2010a).

#### Compatibility Considerations

Source for MEX-files built on 64-bit platforms must be updated in order to successfully build and run with the next release of MATLAB. Review your source MEX-files and `mex` build scripts. For information about migrating your MEX-files to use the large-array-handling API, Upgrading MEX-Files to Use 64-Bit API.

Bug Fixes

## R2009b

New Features, Bug Fixes, Compatibility Considerations

### Changes to -nodisplay and -noFigureWindows Startup Options

When you start MATLAB using `-nodisplay` (UNIX) or `-noFigureWindows` (Microsoft Windows) startup options, running a built-in GUI (predefined dialog boxes) generates this warning:

```This functionality is no longer supported under the -nodisplay and -noFigureWindows startup options.```
If the GUI is modal, MATLAB execution suspends, and you need to type Ctrl+C for the Command Window prompt to reappear.

This change affects predefined dialog boxes, such as `dialog`, `msgbox`, `printpreview`, `uigetfile`, `uisetcolor`, `waitfor`, `waitbar`, and more. For a list of predefined dialog boxes, see Predefined Dialog Boxes. For more information on startup options, see the ```matlab (UNIX)``` and ```matlab (Windows)``` reference pages, respectively.

In a future release, instead of a warning, MATLAB will generate an error when you use such a dialog box under the `-nodisplay` or `-noFigureWindows` options.

#### Compatibility Considerations

To avoid generating the warning, start MATLAB without the `-nodisplay` or `-noFigureWindows` startup options. To avoid warnings while continuing to use these startup options, remove the code that is now producing the warnings.

### Changes to Memory Manager Startup Options

Version 7.9 removes support for the `-memmgr` and `-check_malloc` command line arguments and the `MATLAB_MEM_MGR` environment variable.

#### Compatibility Considerations

MATLAB ignores any memory manager options.

#### Desktop

New features and changes introduced in Version 7.9 (R2009b) are:

### Ability to Customize Keyboard Shortcuts

MATLAB supports customizing keyboard shortcuts for desktop tools. Press combinations of keyboard keys to perform a desktop action, instead of using the mouse to select items from menus. For example, press Ctrl+N to open a blank file in the Editor.

The ability to customize keyboard shortcuts enables you to:

• Modify keyboard shortcuts across desktop tools on an action-by-action basis.

• Modify keyboard shortcuts to match other applications you use or to match your personal preferences.

• Share your keyboard shortcuts with others, or use shortcuts created by someone else.

• Create keyboard shortcuts for some actions that currently have no shortcut.

• Use your preferred keyboard shortcuts when you use MATLAB on a different system than you typically use.

To customize keyboard shortcuts, choose File > Preferences > Keyboard > Shortcuts.

MATLAB does not support customizing keyboard shortcuts for Figure Windows, dialog boxes, or toolboxes. For details, see Customize Keyboard Shortcuts. For a video demo, see Customizable Keyboard Shortcuts.

#### Compatibility Considerations

• The method for specifying keyboard shortcuts differs from previous versions.

In previous versions, you chose File > Preferences > Keyboard, and then chose a set of key bindings. MATLAB no longer limits your choices to either platform-specific settings or Emacs settings.

• Some default keyboard shortcuts differ from the previous defaults.

Defaults changed in Version 7.9 (R2009b) to be more consistent across the MATLAB desktop. Previously, you could specify keyboard shortcut preferences for the Command Window and Editor/Debugger only. For instance, on Windows, default keyboard shortcut preferences appeared as follows:

To restore keyboard shortcuts that were the default before Version 7.9 (R2009b):

1. Choose File > Preferences > Keyboard > Shortcuts.

2. From the Active settings drop-down menu, choose R2009a Windows Default Set, R2009a Macintosh Default Set, or R2009a UNIX Default Set, depending on the platform on which MATLAB is installed.

### Ability to Set Fonts Preferences for Extended M-Lint Messages and Function Browser

MATLAB now supports setting the font size and type for extended M-Lint messages and the function browser. In previous releases, changes to HTML Proportional Text affected only the display in the MATLAB Web browser, the Profiler, and Help topics. To set font preferences:

1. Choose File > Preferences > Fonts > Custom.

2. Under Desktop tools, select HTML Proportional Text, and then specify the font size and type you want to use.

### Save Files from MATLAB Web Browser

To save a file being displayed in the MATLAB Web Browser, select File > Save As.

#### Help Browser

For a demonstration of enhancements to the Help browser, watch the Help Browser Enhancements video.

### Improved Contents Listing

When you expand a product in the Contents pane, you now can view the following:

• Function and block names with brief descriptions — Expand Functions or Blocks, and then expand a category to see the list and descriptions. Select a function or block to view its reference page.

If you provide your own HTML help files for use in the Help browser, you now can include Functions and Blocks entries for your toolbox.

• Demos — Expand Demos, and then select a demo from the list to view or run it.

### Enhanced Presentation of Search Results

Each search result includes:

• A preview of where the search words were found within the page.

• An icon representing the type of document, such as a reference page or demo.

Use new sorting and grouping features to arrange results:

• Sort results by Relevance, in addition to sorting by Type and Product, which were available in previous versions.

• After sorting by Type or Product, you now can collapse and expand results for each type or product. To expand or collapse all groups, right-click in the results pane and select the option you want from the context menu.

The following example of Search Results in the Help browser illustrates grouping, previews, and the block reference page icon.

### Viewing Pages

• To see where the current page is located within the documentation, use the navigation bar at the top of the display pane. To go to another topic in the documentation, select an entry from the navigation bar.

• Use the new Actions button on the display pane toolbar to access features such as Refresh, which clears the search results highlighting for the current page.

• Get links to reference pages for overloaded functions. When you run `doc foo`, if `foo` is an overloaded function, a message appears at the top of the display pane that provides links to the other `foo` reference pages.

• To use the Help browser alongside other tools, dock it in the desktop. When docked in a narrow area of the desktop, the pane for Contents and Search Results moves above the display pane.

#### Compatibility Considerations

The Index and Demos tabs are no longer in the Help browser:

• To find terms that were in the Index, use the search feature instead.

• To access demos for a product, go to the Contents pane and expand the Demos entry for the product.

The Actions button on the toolbar provides access to features for the displayed page. Previously, some of these features were available on individual toolbar buttons. To add individual toolbar buttons, right-click the toolbar and select Customize.

If you provide your own files for use in the Help browser:

• Remove the `helpindex.xml` entry from the `info.xml` file for your toolbox. MATLAB no longer supports the Index.

• Demos you add now appear in the Contents pane under `Other Demos`, which is after the entries for all MathWorks products.

### Improved Workspace Plotting Tool

The Plot Selector button on the Workspace Browser and Variable Editor toolbars has a new look and added capabilities, options, and help. The tool now displays larger icons, includes many more graphing functions, summarizes each function, and displays pop-up windows with syntax descriptions (function hints). You can customize the tool by rearranging and categorizing functions, and by creating a list of "favorites".

For further details, see this video demo and the release note Enhanced Plot Selector Simplifies Data Display.

### Enhanced Current Folder (Directory) Browser

The Current Directory browser is now the Current Folder browser.

For an overview of the enhancements, watch this video, Current Folder Browser Enhancements, or review the following summary:

• Use the expandable tree structure to view the contents of the current folder. Double-click a subfolder to make it the current folder.

• Display the file type in a column.

• Distinguish types of MATLAB program files using new icons:

• class

• function

• script

• View file descriptions below file names. To show or hide descriptions, select View > Show > Description.

• Display hidden files a new way:

• On Windows platforms, MATLAB follows your Windows preference for hidden files.

• On other platforms, MATLAB uses the new setting in Current Folder preferences.

• Find files and folders within the current folder and its subfolders:

• To access the search feature, click the Search button on the address bar, and then enter the string you want to find.

• To clear the results and display all files and folders in the current folder, click the Clear button .

The following illustration shows the new Current Folder browser, including the tree view, new icons for program files, and the search button.

#### Compatibility Considerations

• With the new tree structure, you now see all files, including those in subfolders. You might not be able to run the files you see in the subfolders. To run a file from a subfolder, the subfolder must be on the search path or the subfolder must become the current folder. In previous versions, you could only see files in the current folder, so you could run every file you could see.

• You now search for files by clicking the search button in the address bar. In previous versions, the search feature, referred to as the filter field, appeared if your preference was set to display it.

• File descriptions now appear below the file name. In previous versions, they displayed in a column.

#### File Exchange Desktop Tool — Find and Get Files Created by Other Users

Watch this video, MATLAB File Exchange Access, or review the following summary of what you can do with the new File Exchange desktop tool:

• Access user-created files from the File Exchange repository. The files are at MATLAB Central, the community area of the MathWorks Web site.

• Use the files in your own work to save time and get new ideas.

• Work with the file repository from within the MATLAB desktop.

• Use features like those found in the Web site interface to the File Exchange repository.

The File Exchange desktop tool offers these main features:

• Find files by searching and by selecting tags (keywords associated with files).

• Sort results. For example, show the most highly rated or the most recent files first.

• View details about a file.

To open the File Exchange tool, select Desktop > File Exchange.

If you have questions while you work, access the File Exchange FAQ by clicking the Help button . For full documentation, see File Exchange — Finding and Getting Files Created by Other Users.

#### Editing and Debugging MATLAB Code Files

New features and changes introduced in Version 7.9 (R2009b) are:

### Syntax Highlighting for VHDL and Verilog Code

The MATLAB Editor now supports syntax highlighting for VHDL and Verilog code. For details see, Highlight Syntax to Help Ensure Correct Entries in the Editor.

### File and Folders Comparison Tool Enhanced

When you use the File and Folders Comparisons tool to compare folders, it now includes the following information about each file in each folder:

• The file size, in bytes

In addition, the File and Folders Comparisons tool enables you to reload the information by clicking the refresh button or selecting File > Refresh. For details see, Comparing Files and Folders.

#### Publishing MATLAB Code Files to PDF Output Format

MATLAB now supports PDF as the output format for publishing MATLAB code files. For instructions on how to publish to `.pdf` files, watch the Publishing Features video demo. For details, see Steps for Publishing sine_wave_f.m to PDF.

### How MATLAB Reads Customized Locale Settings on Macintosh OS X Platforms

If you use the Customize option to modify the locale setting, MATLAB ignores the customized portion. For example, if you select the euro currency symbol for a locale set to the United Kingdom, the locale name is:

```en_GB@currency=EUR ```

MATLAB uses the locale name:

`en_GB`

### Mathematics

#### Computational Geometry Functions Being Changed

2- and 3-D computational geometry functions (`delaunay`, `convhull`, `griddata`, `voronoi`, `delaunay3`, `griddata3`) no longer use QHULL or the QHULL options arguments. The N-D functions `gridatan`, `delaunayn`, `convhulln`, and `voronoin` still use QHULL.

#### Compatibility Considerations

The QHULL options arguments to `delaunay`, `convhull`, `griddata`, and `voronoi` are no longer required and are currently ignored. Support for these options will be removed in a future release.

#### Computational Geometry Functions Being Removed

A future release will remove the `griddata3`, `dsearch`, `tsearch`, and `delaunay3` functions. See the table below for alternatives.

`griddata3``TriScatteredInterp`
`dsearch``DelaunayTri/nearestNeighbor`
`tsearch``DelaunayTri/pointLocation`
`delaunay3``DelaunayTri`

#### Compatibility Considerations

Update your old code to use the new computational geometry classes `DelaunayTri` and `TriScatteredInterp`.

#### New Sparse Matrix Functionality In qr and mldivide Functions

`mldivide` supports complex rectangular sparse input matrices. `qr` supports complex sparse input matrices. `qr` for sparse matrix input now supports a third output argument that contains a fill-reducing permutation.

#### Support for Large-Sized Dimensions In fft

MATLAB functions `fft`, `fft2`, and `fftn` (and their inverses `ifft`, `ifft2`, and `ifftn`) can now handle input arrays with a size in 1 dimension greater than${2}^{31}-1$ on 64-bit platforms.

#### Performance Improvement For Large Data Sets

• MATLAB includes improved sparse matrix performance for indexing, basic math, binary and relational operators, and exponential functions.

• There are significant performance improvements to `conv2`.

#### erfcore Being Removed

Use of `erfcore` will produce a warning:

```ERFCORE will be removed in a future release. Use ERF, ERFC, ERFCX, ERFINV, or ERFCINV instead. ```

#### Compatibility Considerations

Replace all instances of `erfcore` with `erf`, `erfc`, `erfcx`, `erfinv`, or `erfcinv`.

Many MATLAB functions are now multithreaded:

#### New Test Matrices in gallery Function

The `gallery` suite of test matrices includes new options `integerdata`, `normaldata`, and `uniformdata`.

### Data Analysis

#### Improved Plot Selector Makes Graphic Data Exploration Easier

The Plot Selector button on the Workspace Browser and Variable Editor toolbars has a new look and added capabilities, options, and help. Now the Plot Selector button changes its appearance to reflect the variable or variables you select. Now it suggests a plot type and indicates its calling argument sequence. You can also make the Plot Selector list the types of graphs you use most often at the top of its drop-down menu. The tool provides descriptions and hints to help you discover data graphing functions and learn to use them more effectively.

For further details, see this video demo and the release note Enhanced Plot Selector Simplifies Data Display.

### Programming

#### Ignore Selected Arguments on Function Calls

This version of MATLAB introduces a new usage for the tilde (`~`) operator. As in earlier releases, tilde signifies a logical NOT. In the 9b release, you can also use the tilde operator to specify unused outputs in a function call, or unused inputs in a function definition. See Ignore Function Inputs in the Programming Fundamentals documentation for more information on this feature.

### Replacing Output Variables with Tilde

This feature enables you to replace this type of function call:

`[val1, ignoreThisOutput, val3] = myTestFun;`

with the following:

`[val1, ~, val3] = myTestFun;`

MATLAB ignores any values returned by a function that have a corresponding tilde in the output list. This new syntax can help you avoid confusion in your program code and unnecessary clutter in your workspace. It also avoids wasting memory to store unused outputs returned from the called function.

### Replacing Input Arguments with Tilde

You can also use the tilde operator to specify unused inputs when you are creating a function. You can replace this type of function definition:

`function myTestFun(arg1, ignoreThisInput, arg3)`

with the following

`function myTestFun(arg1, ~, arg)`

Whenever this function is called, MATLAB ignores any inputs passed to the function that have a tilde in the corresponding position in the input argument list. You are likely to find the tilde operator most useful when writing callback functions and subclass methods that must match a predefined function interface.

#### Internal Packages Make Reserved Functions Easy to Identify

The MathWorks® reserves the use of packages named `internal` for utility functions used by internal MATLAB code. Functions that belong to an `internal` package are intended for The MathWorks use only. Using functions that belong to an `internal` package is strongly discouraged. These functions are not guaranteed to work in a consistent manner from one release to the next. In fact, any of these functions and classes may be removed from the MATLAB software in any subsequent release without notice and without documentation in the product release notes.

See Internal Utility Functions in the Programming Fundamentals documentation for more information.

#### Use of lasterror, lasterr, rethrow(errStruct) Not Recommended

In version 7.5, The MathWorks introduced a new class called `MException` for use in error handling. Prior to this change, the `lasterr` and, more recently, `lasterror` functions kept track of only the one most recently thrown error. The state of any errors thrown before that was overwritten by newer errors. Also, this error state was globally accessible, which means that it could be unintentionally modified or destroyed either during an interactive session or by another function.

When using the newer, object-based error mechanism, every error generated by a MATLAB function stores information about what caused the error in a separate `MException` object. This enables MATLAB to store information about multiple errors, adds the capacity to store new fields of information including links to related errors, and also resolves the problem of being globally accessible.

The MathWorks now discourages the use of the `lasterr` and `lasterror` functions because the information they return is global and thus has the potential to be corrupted. You should replace the use of these two functions with the new style of `try`-`catch` statement that captures an `MException` object to represent the error. When entering commands at the MATLAB command line, you can also use the static method `Mexception.last` to retrieve information on the most recent error. For more information on this method of error handling, see The MException Class.

This change also affects which form of the `rethrow` function to use when reissuing an exception. The original `rethrow` function, in use since before version 7.5, accepts only a structure as input. Because this structure is typically obtained using the `lasterror` function, this form of `rethrow` should be avoided. The later form of `rethrow(MException)`, introduced in version 7.5, accepts an `MException` object as input, and is the recommended form.

#### Compatibility Considerations

It is strongly recommended that you discontinue the use of `lasterror` and `lasterr`, and that you replace the use of these functions in your program code with the `MException`-based style of error handling described above.

#### Use of maxNumCompThreads No Longer Recommended

Invoking the function `maxNumCompThreads` now returns the following warning:

```Warning: maxNumCompThreads will be removed in a future release. Please remove any instances of this function from your code.```

`maxNumCompThreads` continues to operate the same in this release of MATLAB. However, the function will be discontinued in a future release of the product.

#### Compatibility Considerations

It is recommended that you discontinue the use of `maxNumCompThreads`. However, if you do have any program code that invokes this function, you should make sure that such programs are not affected by this new warning.

#### Excel Worksheet Selection in the Import Wizard

In previous releases, the Import Wizard imported only the first populated worksheet in an Excel file. The Import Wizard now allows you to specify the worksheet to import. To start the Import Wizard, use one of the following methods:

• Select File > Import Data.

• Call `uiimport`.

• Double-click a file name in the Current Folder browser.

#### Motion JPEG 2000 Files Supported by mmreader

`mmreader` now imports Motion JPEG 2000 (`.mj2`) files on Windows, Macintosh, and Linux platforms.

#### Compatibility Considerations

Because `mmreader` imports Motion JPEG 2000 files, the function `mmreader.isPlatformSupported` always returns `true` on Windows, Macintosh, and Linux platforms. For a list of file formats that `mmreader` supports, and the requirements to read these formats on each platform, see the `mmreader` reference page.

#### Minimum Sample Rate for audioplayer

If you specify a sample rate less than 80 samples per second, `audioplayer` generates an error with the following ID:

`MATLAB:audioplayer:positivesamplerate`

#### Compatibility Considerations

In previous releases, the error ID on Windows platforms for low sample rates was:

`MATLAB:audioplayer:negativesamplerate`

Change any references to this identifier to:

`MATLAB:audioplayer:positivesamplerate`

#### Documentation Changes: File I/O and Data Import and Export

The function category "File I/O" is renamed "Data Import and Export." It appears immediately below the category "Desktop Tools and Development Environment."

In the MATLAB User Guide, Data Import and Export content previously appeared in the Programming Fundamentals documentation. The User Guide now includes a stand-alone topic for Data Import and Export.

#### Object Array Property Indexing

Object array indexing operations on properties now return an error for improper array references. Before MATLAB 7.9, an expression such as:

`obj.Prop(n) % for non-scalar obj is invalid if Prop is a property`

did not return an error. MATLAB 7.9, you can reference or assign properties from scalar objects only by entering:

`obj(int).Prop(n)`

where `int` is a positive integer.

#### Equality of Objects Using isequal Now Ignores Numeric Class

Before MATLAB 7.9, an expression such as:

`isequal(a,b)`

returned false in cases where `a` and `b` are objects of the same class that have properties set to numeric values which are mathematically equivalent, but of different classes (for example, `double` and `single`),

The behavior of `isequal` in MATLAB 7.9 is consistent with the documented behavior (see `isequal`). `isequal` does not consider class when comparing numeric values.

#### Class Defining Private/Abstract Property Now Errors

MATLAB 7.9 returns an error when it loads a class that defines a property as both `Abstract` and `Private`.

#### Subclasses of Built-in Classes and numel

Before MATLAB 7.9, the `numel` function did not return the same results for built-in classes and subclasses of built-in classes. In MATLAB 7.9, the behavior of `numel` is consistent with built-in classes and subclasses of built-in classes. See Understanding size and numel for a discussion of the current behavior.

#### Array Expansion with Indexed Assignment

Before MATLAB 7.9, initializing a handle object array by specifying the last element in the array to create it:

`obj(10) = MyClass;`

resulted in the same handle being assigned from the second to the penultimate elements of the array. With MATLAB 7.9, all elements in the handle object array have unique handles. See Creating Object Arrays for more information on the current behavior.

#### New Tiff Object Enables Writing of Tiled Data and Broader Metadata Support

Using the new `Tiff` object, you can now write portions of a TIFF file and update the values of individual metadata tags in an image. MATLAB has long offered the capability of reading and writing TIFF files, using the `imread` and `imwrite` functions. However, if you wanted to update any part of the image, you had to write the entire image to the file. Similarly, if you just wanted to update a tag, you had to write the entire image. By providing access to functions in the LibTIFF library, the Tiff object offers more flexibility in creating and editing TIFF images. You can write data to specific tiles in an image and update individual tags in a file, without having to write the entire image.

#### Ambiguity Error Now Reported

Due to a bug, versions of MATLAB prior to Version 7.9 did not report an error in functions such as the following, even though it cannot be determined in the last line whether `U` is a variable or a function:

```function r = testMfile1(A) A = 1; eval('U = 1;'); r = A(logical(end), U(end)); ```

However, if you replace the last line with

`r = A(U(end)); `

MATLAB reports an ambiguity error and has done so since Version 7.0. Starting in Version 7.9, MATLAB reports an ambiguity error for either statement.

#### Compatibility Considerations

In certain circumstances, it is possible that you will see ambiguity errors generated in code that did not report this error in previous releases. If you do get such an error, examine your code and resolve the ambiguous statements.

### Graphics and 3-D Visualization

#### Enhanced Plot Selector Simplifies Data Display

The Plot Selector workspace tool creates graphs of workspace variables. As this video demo shows, the tool lets you access more types of data display functions and provides help about each one. It also categorizes display functions and lets you organize them within its drop-down menu. The following illustration shows the old and new versions of the Plot Selector and calls out new features.

Use the Plot Selector tool to instantly generate graphs of workspace variables. You can choose from more than 40 two-dimensional, three-dimensional, and volumetric MATLAB data display types. It also constructs graphs using Control System Toolbox, Financial Toolbox, and Statistics and Machine Learning Toolbox functions if your installation includes those products.

The Plot Selector button displays a graph icon and the names of selected variables in the Workspace browser or the Variable Editor. Until you select one or more variables, the button reads Select to plot . The graphing function for one or two data vectors still defaults to `plot`, but the tool now gives you additional options and information, including the following:

• The grouping of menu items into categories of graph types, such as Stem and Stair Plots, 3-D Surface Plots, and Analytic Plots. You can rearrange categories and items within a category by dragging them.

• A Favorites category at the top of the menu, where you can collect the types of graphs you use most often. Your collection of favorites persists across MATLAB sessions.

• A star-shaped button on menu items that adds a graph type to or removes one from your Favorites collection.

• Two tabs for toggling the scope of the menu:

• Plots for <variable names> — The set of graphs you can generate with the currently selected variables

• All plots — A master list of graphing functions available on your system

On the All plots tab, graphing functions that are not compatible with the selected variables display in gray and do not plot. Incompatible plot types do not appear on the first-tab menu.

• A button to interchange the axes positions of two selected variables

• Pop-up descriptions of function syntax when your mouse pointer lingers over a menu item

#### Compatibility Considerations

• In previous versions, the Plot Selector automatically assigned variables named `t` and `time` to the x-axis. Now, the variable you select first always plots on the x- axis. Use the switch variable input order button to interchange the x and y variables before plotting them.

• In previous versions, clicking Plot Selector > More Plots opened the Plot Catalog tool. Now, you click Catalog at the bottom of the Plot Selector GUI to open the Plot Catalog tool. The Plot Catalog has not changed.

#### Certain Print Options and Devices Now Warn When Used

The following print command option and device now throw warnings when used and will be removed in a future release:

`Option/Device``Warning ID`Warning Text
`'-adobecset'` print option`'MATLAB:print: adobecset:DeprecatedOption'`The -`adobecset` option will be removed in a future release.
'-`dill'` print device (native support for Adobe Illustrator) `'MATLAB:print: Illustrator:DeprecatedDevice' `The '-`dill'` print device will be removed in a future release. Use Encapsulated PostScript (`'-depsc'`) instead.

If you wish to prevent these warnings from displaying, use the warning command.

• To disable the warning generated by using the `–adobecset` print option:

`warning('off', 'MATLAB:print:adobecset:DeprecatedOption');`

• To disable the warning generated by using the `–dill` print device:

```warning('off', 'MATLAB:print:Illustrator:DeprecatedDevice'); ```

#### Compatibility Considerations

If you have developed code that uses the previous option or device, in the future you must remove such calls or replace them with other code.

#### The view Function No Longer Supports 4-by-4 Transformation Matrices as Input

The `view` function. no longer supports 4-by-4 transformation matrices as input arguments. Previously, you could create a 4-by-4 transformation matrix and use it with `view`.

#### Compatibility Considerations

If you have code that calls `view(T)`, explore using `view([az el])` instead.

### Creating Graphical User Interfaces (GUIs)

#### Expanded Documentation on Techniques for Programmatic GUI Design

The section Lay Out a Programmatic GUI of the Creating Graphic User Interfaces documentation has been expanded. The updated section, formerly called "Aligning Components," now has the title Compose and Code GUIs with Interactive Tools.

The renamed section describes techniques, functions, and predefined dialog boxes you can use to accelerate programmatic construction of GUIs (that is, those you create without using GUIDE).

The section includes examples of setting component positions, colors, and font properties interactively. Also included is an example function that generates a `set` statement for a specified property of any GUI component. By running this function and pasting its output into your GUI code file, you can save time and avoid making typographical errors.

#### Previous Change to How UI Components Set the Figure SelectionType Property

The MATLAB `SelectionType` figure property had an undocumented change in V. 7.6 (R2008a). That change modified how the property is set in response to single-clicking and double-clicking objects, particularly uicontrols, with and without key modifiers.

For information about this change, including potential incompatibilities, see Changes to How uicontrols Set Figure SelectionType. The table in that release note specifies the `SelectionType` setting resulting from clicking a UI component in both enabled and disabled states.

### Support for Apple Macintosh (64-bit) Platforms

MATLAB Version 7.9 (R2009b) supports these new compilers for building MEX-files:

• Apple Xcode 3.1 (gcc / g++ Version 4.0.1)

• GNU gfortran Version 4.3

### Compiler Support to Be Phased Out

MATLAB Version 7.9 (R2009b) supports the following compilers but will not support them in a future version.

#### Windows (32-bit) Platforms

• Intel Visual Fortran Version 10.1

• Intel C/C++ Version 9.1

• Microsoft Visual Studio .NET Version 7.1

#### Windows (64-bit) Platforms

• Intel Visual Fortran Version 10.1

• Intel C/C++ Version 9.1

#### Solaris SPARC (64-bit) Platforms

• Sun Studio 11 cc / CC Version 5.8

• Sun Studio 11 f90 Version 8.2

### Discontinued Support for Intel Visual Fortran Version 9.1

MATLAB no longer supports the Intel Visual Fortran Version 9.1 compiler on the following platforms:

• Windows 32-bit

• Windows 64-bit

#### Compatibility Considerations

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

#### Run-Time Libraries Required for Applications Built with Microsoft Visual Studio 2008 Compiler

You must provide the Visual C++ run-time libraries if you distribute any of the following:

• MEX-file

• Engine application

• MAT-file application built with the Visual Studio 2008 compiler

You need these files to run applications developed with Visual C++ on a computer that does not have Visual C++ 2008 installed. For information on locating the Microsoft Visual C++ 2008 Redistributable Package (x86), containing `vcredist_x86.exe` and `vcredist_x64.exe`, consult your Microsoft documentation.

### INLINE Option to MEX Function Deprecated

The use of the `-inline` switch has been deprecated and will not be available in future versions of the `mex` function.

### MEX Function No Longer Automatically Includes mexversion.c When Building MEX-Files

The `mex` function no longer automatically compiles and links its own copy of `mexversion.c` when generating MEX-files.

#### New Features for Interface to Microsoft .NET Framework

This release includes several changes that affect your use of the Microsoft .NET framework:

## R2009a

New Features, Bug Fixes, Compatibility Considerations

### Desktop Tools and Development Environment

#### Desktop New Features Video

For an overview of the major new features in the MATLAB Desktop Tools and Development Environment area, watch this video demo. Another way to access the demo is by selecting the Demos tab in the Help browser, and then selecting MATLAB > New Features in Version 7.8.

#### Startup and Shutdown

The `matlab` command to start MATLAB now supports the `-singleCompThread` option on all platforms. When you specify this option, you limit MATLAB to a single computational thread. By default, if you do not specify this option, MATLAB makes use of the multithreading capabilities of the computer on which it is running.

#### Desktop

New features and changes introduced in Version 7.8 (R2009a) are:

### New System Browser Preference Instead of docopt.m for MATLAB on UNIX Platforms

On UNIX platforms (except Apple Macintosh), MATLAB now uses the Mozilla® Firefox® browser by default to display documents or Web sites in a system browser. If you want MATLAB to use a different system browser, use the new System Web browser setting in Web preferences to specify it. In addition, the `web` function with the `–browser` option now determines the system browser to use from the preference. For more information, click the Help button in the Web preference pane, or see Web Preferences.

#### Compatibility Considerations

In previous versions, the default system browser on UNIX platforms was Netscape Navigator®; it is now Firefox. If you do not have Firefox on your system, when MATLAB tries to use a system browser, it produces a warning. To correct the problem, use Web preferences to specify a system browser that is installed.

In previous versions, if you wanted to use a different browser, you specified it in the `docopt.m` file. Starting in R2009a, MATLAB ignores the browser specified in `docopt.m`. If you have code that relies on `docopt.m`, your code still runs, but it produces a warning. Remove the calls from your code. In future versions, the code will not run and will produce an error.

If you have your own `docopt.m` file, delete it and either use the new default, Firefox, or specify a different system browser using Web preferences.

### Test Proxy Settings for Accessing the Internet from MATLAB

If you want to access the Internet from MATLAB, and your network uses a firewall or another means of protection that restricts Internet access, you now can ensure your proxy server settings are working correctly. Click the new Test Connection button in Web preferences, and MATLAB will use the proxy settings you specified in Web preferences to attempt to access the Internet. For more information about the proxy server features, click the Help button in the Web preferences pane, or see Web Preferences.

### Tab Completion for Class Directories and File Names

The Command Window and Editor now support tab completion for class directories. In addition, the Command Window supports tab completion for class file names. For details, see Complete Names in the Command Window Using the Tab Key.

#### Help and Related Resources

New features and changes introduced in Version 7.8 (R2009a) are:

### Help Browser No Longer Reopens at Startup

When you start MATLAB, the Help browser no longer automatically opens if you had it open when you last quit MATLAB.

#### Compatibility Considerations

In previous versions, the Help browser opened at MATLAB startup if it had been open when you last quit MATLAB. If you want the Help browser to automatically open at startup, use a startup option. For example, you can include a `helpbrowser` statement in your `startup.m` file. For more information, see Startup Options.

If you include a statement in a `finish.m` file that closes the Help browser automatically whenever you quit MATLAB, you now can remove that statement because MATLAB now performs the action by default.

### docsearch Accepts Multiple Words Without Parentheses

The `docsearch` function, which you can use to search the documentation, now accepts multiple words as input, without requiring the function form of the syntax. For example, in previous versions, you used ```docsearch('word1 word2')```, but now you can use `docsearch word1 word2`. With the new form of the syntax, you can use all options for `docsearch`, such as wildcards (for example, `docsearch wor*`) and exact phrases (for example, `docsearch "word1 word2"`).

### View Your Platform (32-bit or 64-bit) and Architecture in the About Dialog Box

To find out if you are currently running a 32-bit or 64-bit version of MATLAB, select Help > About MATLAB, and view the value in the resulting About MATLAB dialog box. You might need to know the version if you want to take advantage of the benefits of 64-bit MATLAB, or if you want to use files that depend on the version, such as MEX-files.

The About MATLAB dialog box also shows the architecture value, for example, `(win32)` or `(win64)`. You use this value for the `arch` option of the `mex` function.

### Enhancements to Current Directory Browser

These are the enhancements to the Current Directory browser:

• You can use the new View menu to choose the columns to display, to specify the sort order for a column, and to apply grouping for any attribute. In the previous version, you performed these actions using the column header and its context menus, which you can still do (but only on Microsoft Windows platforms). For more information, see Sorting and Grouping Files and Folders.

• A new Description column displays the brief description for files and directories in the current directory. To show the column, use View > Choose Columns. Descriptions include the first help line in a MATLAB program file, and a model file's description, which is useful because you do not need to start the Simulink software to view it. The description is the same one that appears with the details for a selected file. For more information, see Viewing Help for a MATLAB Program File.

• If you try to rename a MATLAB program file in the Current Directory browser to an invalid name, such as `*myfile.m`, a warning appears, notifying you about the name problem. If you want to run the ile, change the file name to a valid one. For more information about what a MATLAB file name requires to be valid so you can run it, see Naming Functions.

• When you right-click a FIG-file in the Current Directory browser, there is a new option to open the figure in GUIDE.

#### Editing and Debugging MATLAB Code

New features and changes introduced in Version 7.8 (R2009a) are:

### Many M-Lint Messages Now Extend to Provide an Explanation and Suggested Action

When you create a file with integrated M-Lint warning and error messages enabled, you can get additional information about many of the messages. When you hover the pointer over an M-Lint indicator that has an extended message, the message appears as a link:

When you click the link, the message window expands to display an explanation and suggested action.

When you click a link within the extended message, the Help browser opens to provide more information.

### M-Lint Messages Now Searchable in Preferences

You can now filter the list of M-Lint messages in the preferences panel (File > Preferences > M-Lint), to find a message of interest.

For example, you can search for a message:

• Containing a string

• Corresponding to a particular message ID

• Within a given category

• With a setting different from the default

Filtering the list of messages can help you see, for example, why certain messages are suppressed, and which messages are disabled. It can be helpful when you want to see the explanation and suggested action for a message, as described in Many M-Lint Messages Now Extend to Provide an Explanation and Suggested Action.

### Block Indenting Option No Longer Provided

The Block Indent option is no longer available. Previously, this option was available for MATLAB, Java, and C/C++ programming languages, when you selected File > Preferences > Editor/Debugger > Language.

 Note:   Do not confuse the Block Indent option with the Smart indenting option, which is still provided.

#### Compatibility Considerations

To attain the effect of block indenting, you can use the No indent option and indent lines manually using the Tab and space keys.

### Integrated Text Editor Option Removed from Editor/Debugger Preferences Panel

The MATLAB Editor no longer supports EmacsLink. In previous releases, you could choose File > Preferences > Editor/Debugger, and then (if you correctly registered EmacsLink with MATLAB) you could select Integrated text editor. This option is no longer available.

### New Navigation Aids in File and Directory Comparisons Tool

The File and Directory Comparisons Tool now provides links to help you quickly navigate to the areas of differences. This is useful for large files that have too many lines to fit on the screen. At the top of the page is a link to the first difference. In addition, each set of differences has an up arrow that you click to go to the previous set of differences, and a down arrow you click to go to the next set of differences. For details, see Stepping Through Differences.

### Wrap Around Option for Find and Replace Now On By Default

When the Find Next operation for searching files in the Editor reaches the end of a file, it automatically wraps around to search from the beginning of the file for the text you specified. In previous releases, the Wrap around option was off by default. This meant that if you were in the middle of a file and the text you were searching for appeared before your current position, Find Next would not find that text.

Because it is more convenient to have this option on, it is now selected by default. To access this option, select Edit > Find and Replace.

### Profile Summary Report Includes Information on Excluded Profiling Overhead

The bottom of the Profile Summary Report now indicates the amount of time spent in profiling overhead, when possible. For details, see Profile Summary Report.

#### Publishing MATLAB Code Files

New features and changes introduced in Version 7.8 (R2009a) are:

### New Options for Capturing Figures in Published Documents

Two new options are available to specify how you want figures captured for published documents: `entireGUIWindow` and `entireFigureWindow`. The `entireGUIWindow` option is appropriate for most publishing purposes and is now the default. The `entireFigureWindow` option is appropriate when you want to capture all the details, including the title bar and other window decorations in your published document. Use this option, for example, if you are creating a tutorial on using MATLAB software. In the GUI, you can select these options from the Figure capture method setting in the Edit M-file Configuration dialog box. In the `publish` function, you can specify these options with `figureSnapMethod`.

For more information, see Figure capture method and the `publish` reference page.

### Dynamic Links in Published Documents

When you publish a document to HTML, you can include dynamic links. Dynamic links are links to files on the MATLAB path. They are called dynamic links because MATLAB evaluates them when the reader of your document clicks on one. To use a dynamic link, the reader must open the HTML file in the MATLAB Web browser.

### Mathematics

MATLAB includes a new object-oriented suite of computational geometry tools, together with a new underlying library called CGAL. The new library provides improved robustness, performance, and memory efficiency. The new tools are presented in three classes:

• New class `TriRep` provides topological and geometric queries for triangulations in 2-D and 3-D space.

• New class `DelaunayTri` provides increased functionality for Delaunay triangulation including topological and geometric queries, incremental modification, and edge constraints.

• New class `TriScatteredInterp` provides fast robust scattered data interpolation and a new natural-neighbor interpolation technique.

#### Incomplete Inverse Gamma Function gammaincinv and Incomplete Inverse Beta Function betaincinv

MATLAB has new functions for incomplete inverse gamma and incomplete inverse beta functions. These functions, `gammaincinv` and `betaincinv`, provide the Statistics and Machine Learning Toolbox functionality of the inverse incomplete gamma and beta functions to MATLAB.

#### Krylov Subspace Methods bicgstabl and tfqmr

MATLAB has new iterative methods for solving systems of linear equations. `bicgstabl` provides the stabilized biconjugate gradients method. `tfqmr` provides a transpose-free implementation of the quasi-minimal residual method.

The `quad2d` function provides additional quadrature functionality for nonrectangular areas of integration.

#### Changes To conv

The `conv` function now accepts the `shape` parameter as input.

#### Changes To conv2 and convn

Use of the `conv2` and `convn` functions with one empty input now returns the matrix of the correct size as described by the `shape` input.

#### Compatibility Considerations

Use of the `conv2` and `convn` functions with one empty input no longer returns an empty matrix. Instead, it returns the matrix of size specified by the `shape` input. For information on how to use the `shape` input, see the reference pages for the `conv` and `conv2` functions.

#### Compatibility Considerations

`nextpow2` with a nonscalar produces a warning:

```Warning: NEXTPOW2(X) where X is non-scalar will change behavior in future versions: it will operate on each element of X. To retain current behavior, use NEXTPOW2(LENGTH(X)) instead.```

This behavior will change in a future release. Replace instances of `nextpow2` with nonscalar input `X` to `nextpow2(length(X))` to maintain the current behavior.

#### Function finite Being Removed

The `finite` function is obsolete. Use of the finite function now causes an error in MATLAB.

#### Compatibility Considerations

Replace all instances of `finite` with `isfinite`.

#### New Multithreading Capability in MATLAB Functions

The MATLAB functions for Fourier transforms `fft`, `fft2`, and `fftn`, and their inverses `ifft`, `ifft2`, and `ifftn` are now multithreaded. In addition, the MATLAB functions `prod`, `sum`, `max`, and `min` are multithreaded.

#### 64-bit Support in LAPACK and BLAS

MATLAB supports 64-bit integers for matrix dimensions in LAPACK, and BLAS. Linear algebra operations can now handle matrices of dimensions greater than ${2}^{31}-1$.

#### Compatibility Considerations

`MEX` files that call BLAS or LAPACK need to be updated. All integer variables passed into BLAS or LAPACK need to be of type `mwSignedIndex`. `MEX` files compiled in previous versions of MATLAB that call BLAS or LAPACK could lead to undefined behaviors. If you have existing code that generates `MEX` files that pass variables to BLAS or LAPACK you need to update the code to use the proper data types and recompile.

AMD Core Math Library (ACML) is upgraded to version 4.1.0.

### Programming Fundamentals

#### Setting the Number of Threads Removed from Preferences Panel

The capability to adjust the number of computational threads in a single MATLAB session is no longer available as of this release. This change removes from the MATLAB preferences panel the ability to set the maximum number of computational threads. The primary reason for this change is that products that MATLAB is dependent upon have the ability to spawn threads from the currently-executing thread. This makes it infeasible to monitor and/or limit the number of computational threads at any given time in a MATLAB process.

MATLAB versions 7.8 and later require that you decide between threading and no threading at the time you launch your MATLAB session. Multithreading is enabled by default. To disable this feature, start MATLAB using the new `singleCompThread` option.

#### Compatibility Considerations

If you currently use the preferences panel to enable or disable multithreading or to adjust the number of computational threads, you need to be aware that this capability is no longer available. See the Startup Optionssection in the Desktop Tools and Development Environment documentation to find out how to enable or disable multithreading when launching a new MATLAB session.

#### Timer Objects Saved in New Format

The format in which MATLAB saves Timer objects has changed in MATLAB version 7.8. Any Timer objects that you create and save while running MATLAB 7.8 cannot be loaded into an earlier version of MATLAB.

#### Compatibility Considerations

If you need to use a Timer object that you have constructed using MATLAB 7.8, you will have to reconstruct and save the object in an earlier version of MATLAB.

The `mmreader` object now supports Linux platforms. For more information about using `mmreader`, see the `mmreader` reference page.

#### Support of Microsoft Excel 2007 File Formats

If you have installed Excel 2007 (or Excel 2003 with the Compatibility Pack) on your Windows system, the `xlswrite` function exports data to XLSX, XLSB, and XLSM formats.

To write data to an Excel file, specify the name and extension of the output file in the call to `xlswrite`. If the file already exists, `xlswrite` writes data in the existent file format. If the file does not exist, `xlswrite` creates a new file, using the format that corresponds to the file extension you specify. If you do not specify a file extension, `xlswrite` applies the XLS extension, and writes a new file in the XLS format.

The `xlsread` function imports any file format recognized by your version of Excel, including XLS, XLSX, XLSB, XLSM, and HTML-based formats. The `importdata` function imports XLS, XLSX, XLSB, and XLSM formats. The Import Wizard imports XLS and XLSX formats.

 Note:   Large files in XLSX format might load very slowly. For better import and export performance, Microsoft recommends that you use the XLSB format.

#### Anonymous Functions Support str2func

The `str2func` which, prior to this release, converted a function name to a function handle, now also converts an anonymous function definition to a function handle. See the function reference page for `str2func` for more information.

```N = 5; NthPower = str2func(['@(x)x.^', num2str(N)]); NthPower(8) ans = 32768```

#### size and range Implemented for validateattributes

The `validateattributes` function now enables you to check the size and range of the input value. The following commands validate the size and range of the values of `x` and `y` respectively:

```x = rand(4,2,6); y = uint8(50:10:200); validateattributes(x, {'numeric'}, {'size', [4,2,6]}); validateattributes(y, {'uint8'}, {'>=', 50, '<=', 200}) ```

#### isempty Supported for Map Objects

MATLAB now supports the `isempty` function for `containers.Map` objects. This example creates a 0-by-1 Map object and runs `isempty` on it:

```mapObj = containers.Map; size(mapObj) ans = 0 1 isempty(mapObj) ans = 1```

#### Bug Fix for Misinterpreted Variables

The example below describes a bug in the MATLAB software that has been fixed in version 7.8. The bug was caused by misinterpretation of an unassigned variable. For certain names, MATLAB mistakenly interpreted the variable as a stem in dot indexing.

The following example illustrates the problem. The example is a bit artificial (which is why the bug went undiscovered for so long).

Suppose you have a function that is intended to perform two levels of dot-indexing:

```function y = dotindextwice_A(j) y = j.lang.String; ```

Calling this function with no arguments results in an error in all versions of MATLAB, as it should.

Now modify the function slightly so that the input variable is named `java` and run it on a version of MATLAB prior to Version 7.8:

```function y = dotindextwice_B(java) y = java.lang.String;```

Now when you run the function without arguments, MATLAB misinterprets the word `java`, treating it as if it were the stem of a Java class name:

```x = dotindextwice_B; % Deliberately called with no arguments ```

Prior to Version 7.8, this function did not throw an error. In fact, it returned an instance of the `java.lang.String` class:

```class(x) ans = java.lang.String ```

This violates the rule that variables in functions are supposed to hide all other uses of the name. Beginning in Version 7.8, calling function `dotindextwice_B` without arguments results in an error, just as calling `dotindextwice_A` does.

#### MATLAB Upgrades Support for HDF5 to Version 1.8.1

The R2009a release of MATLAB uses version 1.8.1 of the HDF5 library. The HDF Group has deprecated two of the HDF5 library functions, `H5Pget_cache` and `H5Pset_cache`. Their M-file counterparts, `H5P.get_config` and `H5P.set_config`, may not work as they did in prior releases of MATLAB. To replace these deprecated functions in your code, consider these four new HDF5 functions: `H5P.get_mdc_config`, `H5P.set_mdc_config`, `H5F.get_mdc_config`, and `H5F.set_mdc_config`.

#### Compatibility Considerations

If your code uses `H5P.get_cache` or `H5P.get_cache`, your program will produce a warning message.

#### Indirect Calls to Superclass Constructors Now Errors

You can no longer call an indirect superclass constructor from a subclass constructor. For example, suppose class B is derived from class A, and class C is derived from class B. The constructor for class C should not call the constructor for class A to initialize properties. The call to initialize class A properties should be made from class B.

#### Compatibility Considerations

If you define classes in which subclass constructors call indirect superclass constructors, MATLAB now issues an error when you attempt to create an instance of the subclass. Call Only Direct Superclass from Constructor for information on how to correctly code subsclass constructors.

### Graphics and 3-D Visualization

#### Functions Previously Only Available in the Image Processing Toolbox Now Available in MATLAB

The following functions have been added to MATLAB from the Image Processing Toolbox:

• `rgb2ind`: Convert RGB image to indexed image.

• `dither`: Convert image using dithering.

• `cmunique`: Eliminate unneeded colors in colormap of indexed image.

• `cmpermute`: Rearrange colors in colormap.

• `imapprox`: Approximate indexed image by one with fewer colors.

#### Compatibility Considerations

• The `dither` and `imapprox` functions no longer display their output as an image via a call to `imshow` when called with no output arguments. Instead, the first output argument appears in the Command Window if no semicolon ends the line.

• Function `rgb2ind` errors when called with syntax `rgb2ind(rgb)`.

• Function `imapprox` errors when called with syntax `imapprox(x,map)`.

### Creating Graphical User Interfaces (GUIs)

#### New Programmatic GUI Doc Example

A new example in the documentation teaches you how to code a GUI that manages multiple lists, such as to-do and shopping lists, contact information, music or video catalogs, or any set of itemizations. Among other things, it illustrates how to write MATLAB code to:

• Share callbacks among uicontrols.

• Obtain component handles from their tags.

• Create a new version of an existing GUI.

• Import and export list data.

• Edit, add, delete, and reorder list items.

• Save a list in the GUI itself.

• Concurrently run multiple GUIs containing different data that call back to the same function.

This example does not use GUIDE. To read about and run it, see A GUI That Manages List Data in the documentation for Creating Graphical User Interfaces.

The Help menu in GUIDE now links to more topics in the documentation than previously. It also links to a set of video tutorials on the MATLAB Central Web site. For details, see Getting Help in GUIDE in the Opening GUIDE section of the Creating Graphical User Interfaces documentation.

### External Interfaces/API

#### New Interface to Microsoft .NET Framework

The interface to .NET allows you to bring .NET assemblies into the MATLAB environment, to construct objects from classes contained in the assemblies, and to call methods on these objects. For complete documentation of this feature, see Using .NET Libraries from MATLAB. For an overview of the .NET interface, watch this video demo.

#### Expanded Platform Support Added for MATLAB Serial Port

MATLAB Serial Port is now supported on the following platforms:

• Microsoft Windows 64-bit

• Apple Macintosh OS X

• Macintosh OS X 64-bit

• Linux

• Linux 64-bit

• Sun Solaris™ 64-bit

### New Compiler Support

MATLAB Version 7.8 (R2009a) supports these new compilers for building MEX-files:

#### Microsoft Windows (64- and 32-bit) Platforms

• Microsoft Visual Studio 2008 SP1

#### Linux (64- and 32-bit) Platforms

• gcc Version 4.2.3

#### Apple Macintosh (32-bit) Platforms

• GNU gfortran Version 4.2.2

### Compiler Support To Be Phased Out

The following compilers are supported in Version 7.8 (R2009a), but will not be supported in a future version of MATLAB:

#### Windows (32-bit) Platforms

• Intel Visual Fortran Version 9.1

• Intel Visual Fortran Version 10.1

• Intel C/C++ Version 9.1

• Microsoft Visual Studio .NET Version 7.1

#### Windows (64-bit) Platforms

• Intel Visual Fortran Version 9.1

• Intel Visual Fortran Version 10.1

• Intel C/C++ Version 9.1

#### Solaris SPARC (64-bit) Platforms

• Sun Studio 11 cc / CC Version 5.8

• Sun Studio 11 f90 Version 8.2

### Discontinued Compiler Support

MATLAB no longer supports the following compilers:

#### Windows (32-bit) Platforms

• Open Watcom Version 1.3

• Microsoft Visual Studio 2005 Express Edition

#### Windows (64-bit) Platforms

• Microsoft Platform SDK

#### Apple Macintosh (32-bit) Platforms

• g95 Version 0.90

#### Compatibility Considerations

To ensure continued support for building your C/C++ programs, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

#### Do Not Use mxFree to Destroy mxArrays

It is improper to call `mxFree` on an `mxArray`. Previously, to remedy misleading statements in older documentation, under limited circumstances, MATLAB issued a warning in code that made this error. MATLAB no longer issues the warning.

#### Compatibility Considerations

The correct function to use to release memory for an `mxArray` is `mxDestroyArray`. Calling `mxFree` on an `mxArray` could cause memory corruption, which might result in a segmentation violation.

#### Cannot Build MEX-Files Using MATLAB Version 5 API

MATLAB does not support the `-V5` option to the `mex` function.

#### Compatibility Considerations

You are no longer able to build a MEX-file using the MATLAB Version 5 API. If you use any of the functions shown in the Obsolete Functions: MX Array Manipulation table, you must replace them with functions from the Replacement column, if available. These obsolete functions were deprecated when MATLAB Version 6 was released over 5 years ago.

#### MEX-Files Calling BLAS or LAPACK Functions Must Be Updated On 64-Bit Platforms

You must update any MEX-file that calls functions in the BLAS or LAPACK math packages on 64-bit platforms. The change occurs as a result of updated support, described in 64-bit Support in LAPACK and BLAS. Existing MEX-files generated in previous versions of MATLAB will result in undefined behavior (likely crashes), if run in R2009a. The previous versions pass 32-bit integer arguments, but the math routines now read and write to 64 bits of memory. The results you see depend on what is stored in the subsequent 32 bits of memory.

#### Compatibility Considerations

On 64-bit platforms, you must use 64-bit integers for all input and output variables when calling LAPACK and BLAS routines in C and Fortran source MEX-files. Use the `mwSignedIndex` type for platform-independent code.

#### Object .o Files Saved on Macintosh Systems for Debugging

MATLAB saves object `.o` files when compiling MEX-files on Apple Mac OS Version 10.5 systems so that you can use source-level debugging.

#### Run-Time Libraries Required for Applications Built with Microsoft Visual Studio 2008 Compiler

If you distribute a MEX-file, an engine application, or a MAT-file application built with the Visual Studio 2008 compiler, you must provide the Visual C++ run-time libraries. These files are required to run applications developed with Visual C++ on a computer that does not have Visual C++ 2008 installed. For information on locating the Microsoft Visual C++ 2008 Redistributable Package (x86), containing `vcredist_x86.exe` and `vcredist_x64.exe`, consult your Microsoft documentation.

#### New Features for Shared Library Interface

• It is now possible to use the `char**` return value and to increment the resulting pointer to retrieve all values. See Passing an Array of Strings.

• Added support for accessing values exported by a library.

• All fully and partly sized arrays should now work.

#### New Java Thread Safety Functions

Use the following new functions to work with Sun Java objects on the Event Dispatch Thread (EDT).

FunctionDescription
`javaObjectEDT`

Construct Java object on EDT

`javaMethodEDT`

Call Java method from EDT

#### Improved Robustness of Web Services Functions

The underlying technology used in the `createClassFromWsdl` and `parseSoapResponse` functions was modified to better ensure support for WSDL and SOAP standards.

#### Compatibility Considerations

There was no intended change to functionality or results of the `createClassFromWsdl` and `parseSoapResponse` functions, which MathWorks verified through testing. There are many variations among WSDL files and Web services and they cannot all be tested. Therefore, it is possible that your results using the `createClassFromWsdl` and `parseSoapResponse` functions in this version could differ from a previous version.

Ensure that your results using `createClassFromWsdl` and `parseSoapResponse` functions are as expected.

## R2008b

New Features, Bug Fixes, Compatibility Considerations

### Desktop Tools and Development Environment

#### Desktop New Features Video

For an overview of the major new features in the MATLAB Desktop Tools and Development Environment area, watch this video demo. Another way to access this and other video demos is to select the Demos tab in the Help browser, and then select MATLAB > New Features in Version 7.7.

#### Startup and Shutdown

New features and changes introduced in Version 7.7 (R2008b) are:

### Macintosh Startup and Root Directory Enhancements and Changes

MATLAB for Apple Macintosh platforms is now installed like many other applications for Macintosh platforms, as a Macintosh `.app` bundle. This has resulted in some enhancements and changes to starting and using MATLAB on Macintosh platforms.

#### Startup Location

To start MATLAB on the Macintosh platform, double-click the `MATLAB_R2008b` icon in the `Applications` folder. This differs from R2008a (V7.6), where you started MATLAB by double-clicking the `MATLAB 7.6` icon in the `Applications/MATLAB_R2008a` folder; there was an additional folder level in R2008a.

#### Starting MATLAB from a File

You can now start MATLAB by double-clicking a file with a file extension that has been associated with MATLAB, such as a file with a `.m` extension. Similarly, you can drag a file onto the `MATLAB_R2008b` icon in the `Applications` folder or in the dock. These actions start MATLAB and open the file.

#### Contents of MATLAB Root Directory

When you use file browser GUIs to navigate in the MATLAB root directory, `/Applications/MATLAB_R2008b`, (known as the `matlabroot` directory), you cannot directly view or access its contents. For example, when you select File > Open and navigate to `Applications/MATLAB_R2008b`, no contents display. To access the contents, press Command+Shift+G, and enter the path to the MATLAB root directory in the resulting Go To Folder dialog box, for example, `/Applications/MATLAB_R2008b.app`.

Similarly, when you select `MATLAB_R2008b` in the `Applications` folder using the Finder, you do not see the contents. To access the contents, right-click (or Ctrl+click) `MATLAB_R2008b`, and from the context menu, select Show Package Contents. For more information, see Navigating Within the MATLAB Root Folder on Macintosh Platforms.

#### Startup Options and the Start MATLAB Settings Dialog Box

You can no longer set startup options using the Start MATLAB Settings dialog box and you can no longer start MATLAB from any `.smat` files you saved using Start MATLAB Settings. The dialog box is now used only for diagnostics and only appears if MATLAB experiences a problem during startup.

To set the startup directory in MATLAB, use the `userpath` function. To instruct MATLAB to run a specified statement upon startup, start MATLAB using the `matlab` command from a shell, as you would to start MATLAB on any UNIX platform. For more information, see Startup Options.

#### Starting MATLAB in a Shell

In R2008b (V7.7), to start MATLAB from a shell, enter the path to the executable, `/Applications/MATLAB_R2008b.app/bin/matlab`. This differs from R2008a (V7.6), in which the path was `/Applications/MATLAB_R2008a/bin/matlab`.

#### Compatibility Considerations

The compatibility considerations are described along with the above changes.

### Updated Version of JVM Software

MATLAB is now using Sun Microsystems™ JVM™ Version 6 Update 4 software on all platforms, except the Apple Macintosh platform. If you specify a version of Java software to use with MATLAB, this change might impact your work.

### Specifying Address Space Protection During Startup on Windows Platforms

When you start MATLAB on Microsoft Windows 32-bit platforms, you can set a startup option to help ensure the largest available contiguous block of memory after startup, which is useful if you run memory-intensive operations, such as processing large data sets. You can use the new `-shield` startup option to specify different levels of protection of the address space during the MATLAB startup process. This can also help resolve problems if MATLAB fails to start. For more information, see the ```matlab (Windows)``` reference page.

### Changes to -nojvm Startup Option

When you start MATLAB with the `-nojvm` startup option, Handle Graphics functionality will no longer be supported. (The `-nojvm` option is available for UNIX platforms; see background information at 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`.

In MATLAB Version 7.7 (R2008b), if you use the `-nojvm` startup option and use Handle Graphics functionality, MATLAB produces this warning:

```This functionality is no longer supported under the -nojvm startup option. ```

In a future release, instead of a warning, MATLAB will produce an error when you start with the `-nojvm` option and use Handle Graphics functionality.

#### Compatibility Considerations

To avoid the warning, 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 the Performance and Memory Usage topics in the MATLAB Programming Fundamentals documentation.

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

### Changes to matlab Memory Manager Startup Options

The `matlab` command line arguments `-memmgr` and `-check_malloc` are deprecated and will be removed in a future release. The environment variable `MATLAB_MEM_MGR` is also deprecated and will be removed. For information about these options, see ```matlab (Windows)``` or ```matlab (UNIX)```.

#### Compatibility Considerations

If you use these options, MATLAB generates a warning message.

#### Desktop

New features and changes introduced in Version 7.7 (R2008b) are:

### New Default Layout for Desktop

There is a new desktop layout when you select Desktop > Desktop Layout > Default. It includes the same components as the previous default desktop layout, however, they are arranged differently. If you prefer the previous default layout, arrange your desktop in that way and save the layout. You then can reuse the saved layout at any time.

### Closing Document Windows Using Middle Mouse Button

If you have multiple documents open, you can now close a document by clicking the middle mouse button when the pointer is in the document's button on the document bar.

### Preferences Opens to Last Pane Used

When you open the Preferences dialog box, it displays the last preference pane you viewed in the current session. In prior versions, the Preferences dialog box displayed the pane associated with the tool from which you accessed it.

### Changes to Desktop Text Font

You now can specify that the desktop text font use the system default font. To do this, select File > Preferences > Fonts. Then, for Desktop text font, select Use system font. For more information, click the Help button in the Fonts Preferences dialog box.

The default settings for the desktop text font and the HTML Proportional Text font have changed. This only affects existing users who choose to use a new preferences file (`matlab.prf`) in R2008b.

### Provide Authentication Settings for Proxy Server when Accessing the Internet from MATLAB

If you want to access the Internet from MATLAB and your network uses a firewall or another means of protection that restricts Internet access and requires you to provide a username and password, use the new proxy server authentication settings in Web preferences to specify the values. For more information, click the Help button in the Web preferences pane, or see Web Preferences.

### Find Function Names and Get Help Using the New Function Browser

While you work, you can find the names of functions and get help for them using the new Function Browser. The Function Browser is useful if you want to find a function whose name you cannot remember, determine if there are functions that do what you want, or view the reference page for a function. The Function Browser uses a subset of the information found in the function reference pages in the Help browser for quick access while you work.

To access the Function Browser, press Shift+F1, or if you are in the Command Window or Editor, click the Function Browser button . The Function Browser opens. You can specify the products to look in, browse categories of functions, and search for words that appear in function reference pages. For more information, see Find Functions Using the Function Browser.

### View Syntax Hints While Entering Statements

While you enter statements in the Command Window and Editor, you can view the allowable input argument syntax for a function in a pop-up window. This feature is called function hints. To use function hints:

1. Type the function name, followed by the left parenthesis, `(`, and pause. The syntax for input arguments automatically displays in a pop-up window near the statement you are entering.

2. The arguments you can enter appear in bold. Enter your first argument and type a comma ( `,` ) after it. The syntax options in the pop-up window then change, based on the argument you just entered.

3. Continue entering arguments, using the hints as needed. You can dismiss the function hints pop-up window at any time by pressing Esc. When you type the closing parenthesis, ), or when there are no more arguments to enter, the pop-up window automatically closes.

The following illustration shows function hints for the `plot` function.

To turn off the function hints feature so the pop-up menu does not automatically display the syntax reminders when you type an opening parenthesis, use Keyboard preferences; for Function Hints, clear the check box that enables them.

For more information, see View Function Syntax Hints While Entering a Statement.

### New Help Features — Function Browser and Function Hints

There are two new features that provide help while you work:

### Viewing an HTML Version of Help for Classes You Create

If you create your own class definition files in MATLAB and you provide help in the `classdef` file for the class, properties, and methods, you can conveniently view the help in the Help browser by running `doc` `classname`. For more information, see Help for Classes You Create. The following example shows class information in the Help browser for the user-created class, `sads`, displayed by running

`doc sads`

### Finding Text In Small Help Windows

The Find dialog box is now available from the small help windows used for the Help on Selection feature and for context-sensitive help. The find feature is useful when you want to search for a specific word or phrase within one of these help windows. To access the Find dialog box:

• In a window used for the Help on Selection feature, press Ctrl+F on Windows and UNIX platforms or Cmd+F on Macintosh platforms. You can also click the Find text button

• In a context-sensitive help window, press Ctrl+F on Windows and UNIX platforms, and Cmd+F on Macintosh platforms

### Changes to Search Field in Help Browser

You can quickly access the Product Filter from the search field by selecting the down arrow at the right side of the search field and from it, selecting Filter by Product. The Help pane of the Preferences dialog box opens. For more information about the product filter, click the Help button in the dialog box.

As you enter a term in the search field, a history of terms you previously entered in the current session appears. To view the full history, select the down arrow at the right side of the search field and from it, select Show Search History. You can select an item in the search history to rerun the search.

To execute a search, enter the search terms and press Enter. There is no longer a Go button.

#### Workspace, Search Path, and File Operations

New features and changes introduced in Version 7.7 (R2008b) are:

### Current Directory Browser Enhanced, Including New Navigation and Grouping Features

The Current Directory browser includes new ways to navigate and to view the directory contents. There are also new ways to find files, including a new filter field.

• Use the new address bar to view the current directory and to view and navigate to subdirectories within the current directory path.

• Access common features from the Actions button on the toolbar.

• Add and remove buttons from the toolbar by right-clicking the toolbar and selecting Customize.

• List only files whose names contain a specified string by using the new filter field. To show the filter field, use File > Preferences > Current Directory.

• In the Details pane at the bottom of the tool, view a list of elements in the selected file, such as subfunctions in a MATLAB program file. Double-click an element to open the file at the location of the element.

• For a MAT-file, drag selected variables from the Details pane to the Workspace browser to load them into MATLAB. Similarly, save workspace variables to a MAT-file by dragging them from the Workspace browser to the Current Directory browser.

• Group items in the current directory, that is, view related items together. From the Actions button, select Group By and select the attribute you want to group by.

Some of the major changes are highlighted in the following illustrations.

#### Compatibility Considerations

The following aspects of using the Current Directory browser are different in Version 7.7 (R2008b) than in the previous version. Following is a table of what changed and the way to perform the same action in Version 7.7.

ChangeWhat To Do Instead In Version 7.7 (R2008b)
The toolbar no longer includes the buttons it previously included. You can now specify which buttons to include on the toolbar. You can include the toolbar buttons included in previous versions, or use these alternatives:
• Go up one level button — Instead, select a directory one level up by using the address bar.

• Find files button — Instead, select Find Files from the Actions button on the toolbar, or use Ctrl+F.

• New folder button — Instead, select New Folder from the Actions button on the toolbar.

• Directory reports — Instead, select Reports from the Actions button on the toolbar.

The string display of the full path for the current directory has been replaced by the address bar view. You can still access the string display, which can be useful if you want to copy it or edit it directly. To access the string, click the blank area to the right of the last subdirectory in the address bar. To return to the address bar view, press the Escape key.
You do not select attributes (columns) to display using Current Directory Preferences (Browser display options).

Right-click any column header to select or clear the columns to display, such as file size. You can only do this on Microsoft Windows platforms.

The file description no longer appears in a column.View the description for a selected file in the detail pane.
The full help for a MATLAB program file no longer appears in the detail pane.Press F1 to view the reference page for the selected file.
You do not elect to show details using Current Directory Preferences (Browser display options).Use the arrow on the right side of the detail pane separator to show or hide the details.
The File Filter options, accessible from the context menu and the View menu, have been removed. Use the new filter field (use Preferences for the Current Directory browser to show the filter field), or sort by file type (click the document icon header), or group by file type using the new grouping feature (available from the Actions button).
The View menu was removed. Use the new filter field (previously described) to filter the view. For Directory Reports, select Reports from the Actions button on the toolbar.
When you look for items in the current directory by typing the initial letters in the name, a pop-up window no longer appears showing the letters that you typed. As before, the first entry whose name begins with the letters you typed is selected. If you want to see what you type when finding items in the current directory, instead use the filter field.

### Structure Results of dir for Nonexistent Files Now Include Empty Matrices

When you run `dir` with an output argument and the results include a nonexistent file or a file that `dir` cannot query for some other reason, `dir` now returns empty matrices for the `date`, `bytes`, and `datenum` fields. The most common occurrence is on UNIX platforms when `dir` queries a file that is a symbolic link and the symbolic link points to a nonexistent target. A nonexistent target is when a target has been moved, removed, or renamed. For example, if `my_file` in `my_dir` is a symbolic link to another file that has been deleted, then running

`r = dir('my_dir')`

includes this result for `my_file`:

```r(n) = name: 'my_file' date: '' bytes: [] isdir: 0 datenum: [] ```

where `n` is the index for `my_file`, found by searching `r` by the `name` field.

With empty matrices returned, code you write to use the results of `dir` can be simpler and more robust. For more information, see the reference page for the `dir` function.

#### Compatibility Considerations

In previous versions, `dir` returned inappropriate values for files that could not be queried:

``` r(n) = name: 'my_file' date: '18-Jan-2038 22:14:07' bytes: 0 isdir: 0 datenum: 7.4438e+05 ```

If you have existing files that rely on the results of `dir` for a file that could not be queried, your code might not produce the result it used to. If you write new code that depends on the new results for `dir` and run it in a previous version of MATLAB, it might not produce the results you expect. In either case, there will probably not be a warning or error.

### Workspace Browser Toolbar Is Now Configurable

Rearrange, add, or remove buttons and other controls from the Workspace Browser toolbar using File > Preferences > Toolbars. Alternatively, right-click the toolbar and select Customize from the context menu. By default, the Print button is not on the toolbar.

### Semicolon (;) Path Separator Character Now Used on UNIX Platforms

On UNIX platforms, MATLAB now uses a semicolon (;) as the character that separates directories in the search path file, `pathdef.m`, which is the character used on Windows platforms. This is beneficial if you work with the contents of the `pathdef.m` file programmatically on both Windows and UNIX platforms. In versions prior to Version 7.7 (R2008b), MATLAB used the colon (:) character as the path separator on UNIX platforms.

#### Compatibility Considerations

MATLAB will continue to accept the colon (:) character as a valid path separator on UNIX platforms, so any existing code you have that relies on it will still work.

You will experience a problem if you have any directories that contain a semicolon in their name. You will need to rename the directories to include them on the search path.

#### Editing and Debugging MATLAB Code

New features and changes introduced in Version 7.7 (R2008b) are:

### Create New Function and Class Files Using Templates

When you create new functions and class definition files (`classdef`), you can start with a template that reminds you to include standard information. Select File > New > Function M-File, or File > New > Class M-File. A new file containing template information opens in the Editor.

### View Syntax Hints, Find Function Names, and Get Quick Help

While you enter statements in the Editor or Command Window, you can display the syntax for a function in a temporary pop–up window. For more information, see View Syntax Hints While Entering Statements.

You also can find the names of and get help for functions using the new Function Browser—for more information, see Find Function Names and Get Help Using the New Function Browser.

### Set Color and Width of Right-Hand Text Limit

In the Editor, where you can enable a vertical line to indicate a right-hand text limit, you now can set the width and color of the line. Note that the default color for the line is now gray, instead of light red.

Set preferences for the line by selecting File > Preferences > Editor/Debugger > Display, which opens the Preferences dialog box.

### Set Cursor to First Nonwhite Character on Line

When you press the Home key, the cursor goes to the first nonwhite character on the current line. When you press the Home key twice, the cursor goes to the beginning of the line.

#### Compatibility Considerations

In versions prior to Version 7.7 (R2008b), the Home key always moved the cursor to the first column of the current line.

### Suppress a Specific M-Lint Message Throughout a File

You can now suppress a specific M-Lint message throughout a file by right-clicking on an M-Lint indicator that elicits the message, and then from the context menu, selecting ```Suppress All Instances in this File```.

For details, see Suppress All Instances of a Message in the Current File in the MATLAB Desktop Tools and Development Environment documentation. For information on manually inserting the string that tells M-Lint to suppress the message throughout the file, see the documentation for the `mlint` function.

### New M-Lint Message for Suppressed Messages

An M-Lint message now appears if you previously suppressed a message using the `%#ok` directive, and that message no longer appears. This can result if the message is already suppressed using preferences (File > Preferences > M-Lint), and the code has changed such that the message is no longer generated, or if the rules M-Lint follows for generating the message have changed. The new message is:

```An M-Lint message was suppressed here, but the message no longer appears. Use the context menu to fix.```

For an example, see the Suppressing All Messages on a Line with mlint example in the `mlint` function documentation.

### View M-Lint Message in ToolTip Using the Keyboard

To open an M-Lint Message ToolTip using the keyboard, place the cursor over the marked code and press Ctrl + M. This feature is offered in addition to the identical behavior available when you use the mouse pointer to hover over code that is marked by M-Lint. For an example of viewing an M-Lint message in a ToolTip, see Check Code for Errors and Warnings in the MATLAB Desktop Tools and Development Environment documentation.

### Apply M-Lint Autofix Using the Keyboard

To fix a problem marked by M-Lint as having an automatic fix available, place the cursor over the marked code, and then press Alt + Enter. This feature is offered in addition to the identical behavior available when you use the context menu. For an example of using the M-Lint autofix feature, see Check Code for Errors and Warnings in the MATLAB Desktop Tools and Development Environment documentation.

### Code Fold Single Program, Multiple Data (spmd) Blocks

By default, the Editor now supports code folding for single program, multiple data (spmd) blocks. For more information on code folding, see Code Folding — Expand and Collapse Code Constructs in the MATLAB Desktop Tools and Development Environment documentation.

### File and Directory Comparisons Tool: Highlight Changes

The File and Directory Comparisons Tool now uses shades of colors to mark differences in the contents of two directories being compared. Light colors indicate files that differ and dark colors indicate subdirectories that differ. For details and an example, see Comparing Folders and Zip Files in the MATLAB Desktop Tools and Development Environment documentation.

#### Compatibility Considerations

In releases prior to Version 7.7 (R2008b), the same color intensity highlighted differences in both files and directories.

### Block Indenting Will Not Be Included in Next Version

The Block Indent option will no longer be provided, starting in the next version of MATLAB. Currently, this option is available for M, Java, and C/C++ programming languages, when you select File > Preferences > Editor/Debugger > Language. To attain the effect of block indenting, you can use the No indent option and indent lines manually using the Tab and space keys.

If you have concerns about the pending removal of the Block Indent option, please contact Technical Support at `http://www.mathworks.com/support/contact_us`.

### Accessing Contents of MATLAB Root Directory on Macintosh Platforms

Starting in MATLAB 7.7 (R2008b), on Macintosh platforms, you cannot use file browser GUIs to directly access contents of the MATLAB root directory. For example, when you use File > Open from the Editor, you cannot directly select a file located within `matlabroot`. For more information, see Contents of MATLAB Root Directory.

### Access Directory Reports

You now access Directory Reports by navigating to the directory containing the MATLAB program files for which you want to produce reports. Then, on the Current Directory browser toolbar, click the Actions down arrow and select the type of report you want to run for all of the MATLAB program files in the current directory. Note that these reports are now referred to as Reports, rather than Directory Reports.

#### Compatibility Considerations

In versions prior to Version 7.7 (R2008b), you navigated to the directory containing the MATLAB program files for which you wanted to produce reports. Then, you clicked the Directory Reports down arrow on the Current Directory browser toolbar.

#### Publishing MATLAB Code Files

New features and changes introduced in Version 7.7 (R2008b) are:

### Include Figure Window Details in Published Documents

In versions prior to Version 7.7 (R2008b), when you published a file that included a figure window, only the graph or figure was included in the published document. Using the `figureSnapMethod` option, you can now specify that you want the window details included in the published document. For details, see the `publish` reference page.

### Inline Math Supported in Published Documents

In versions prior to Version 7.7 (R2008b), you could publish LaTeX code in a published document as a code block, separate from the rest of your comments, if any. Now, you can publish LaTeX math symbols inline with the rest of your comments. For details, see Inline LaTeX Math Equations.

### Publish Setting: Cascading Style Sheet Is Now XSL File

In versions prior to Version 7.7 (R2008b), there was a Cascading Style Sheet setting on the Publish Configurations dialog box (which you access by clicking the Publish down-arrow button ). This setting is now called XSL File, to more accurately reflect the setting.

#### Compatibility Considerations

The Cascading Style Sheet setting on the Publish Configurations dialog box is now XSL File.

### Mathematics

#### Upgrade to Random Number Generator

• The `randn` function uses a new longer period random number algorithm as its default.

• The new function `randi` returns random integers from a uniform discrete distribution.

• The `@RandStream` class allows you to construct a random number stream object and set its properties. For more information, see Random Numbers in the MATLAB Mathematics documentation.

#### Compatibility Considerations

The `randn` function now produces different results than in previous releases. Because the values returned by `randn` are intended to be random, this change should not affect most code.

`rand` and `randn` now draw from the same random number stream. In prior releases, `rand` and `randn` had separate independent underlying random number streams. Since `rand` and `randn` now access the same stream, using `randn` will affect subsequent values produced by `rand` and vice-versa. See Creating and Controlling a Random Number Stream in the MATLAB Mathematics documentation for more information.

#### Multipoint Boundary-Value Problems with `bvp5c`

The solver `bvp5c` will take multipoint boundary-value problems.

#### Upgrades to `lsqnonneg`

`lsqnonneg` now runs more efficiently. It accepts sparse matrices as inputs and maintains sparsity throughout its internal iterations.

#### Functions and Properties Being Removed

Function or Property NameWhat Happens When You Use Function or Property?Use This InsteadCompatibility Considerations
`betacore`Fails`betainc`Replace all existing instances of `betacore` with `betainc`.
`colmmd`Fails`colamd`Replace all existing instances of `colmmd` with `colamd`.
`symmmd`Fails`symamd`Replace all existing instances of `symmmd` with `symamd`.
`flops`FailsNoneRemove all instances of `flops`. With the incorporation of LAPACK in MATLAB Version 6, counting floating-point operations is no longer practical.

#### Upgrade to Intel Math Kernel Libraries

For Windows, Intel Mac, and Linux platforms, MATLAB software supports the Intel Math Kernel Library (MKL) version 10.0.3.

### Data Analysis

#### Specialized Data Tips for the hist Function

When you create a histogram display using `hist` and place data tips in the plot in data cursor mode, they now snap to the top center of the bin you attach them to. The data tip contents have changed as well, and now consist of:

• Number of observations falling into the selected bin

• The x-value of the bin's center

• The lower and upper x-values for the bin

For details, see Using Data Cursors with Histograms in the MATLAB Graphics documentation.

#### Compatibility Considerations

Data tips for histograms no longer display the x and y coordinates of their locations and no longer snap to the four corners of the bins, as they do for `bar` plots. The data tips are also larger, to accommodate the extra information.

### Programming Fundamentals

#### Fast Key Lookup Provided with New Map Data Structure

This release introduces a new MATLAB class called a Map. An object of the Map class is an array of any MATLAB data type that supports lookup table functionality. Unlike most arrays in MATLAB that only allow access to the elements by means of integer indices, indices for Map containers can be nearly any scalar numeric value or a character string.

The following example creates a Map object that is an array of strings. It is very much like any other string array except that with each value of this array there is also a lookup key associated with it. This particular Map contains the names of capital cities in the United States. These are the values of the Map object. Associated with each capital city value is the US state that it resides in. These are the keys of the Map object. You look up values in the Map using key indices. Call the `containers.Map` constructor to create an array of six capital cities indexed by six US states. (The capital of Alaska has purposely been entered incorrectly):

```US_Capitals = containers.Map( ... {'Arizona', 'Nebraska', 'Nevada', ... % 6 States 'New York', 'Georgia', 'Alaska'}, ... {'Phoenix', 'Lincoln', 'Carson City', ... % 6 Capitals 'Albany', 'Atlanta', 'Fairbanks'}); ```

Show the capitals of three of the states by looking them up in the Map using the string indices `'Nevada'`, `'Alaska'` and `'Georgia'`:

```values(US_Capitals, {'Nevada', 'Alaska', 'Georgia'}) ans = 'Carson City' 'Fairbanks' 'Atlanta' ```

Correct the capital city of Alaska by overwriting the entry at string index `'Alaska'`:

```US_Capitals('Alaska') = 'Juneau'; US_Capitals('Alaska') ans = Juneau ```

The term `containers.Map` refers to a `Map` class that is part of a MATLAB package called `containers`. For more information, see Map Containers in the Programming Fundamentals documentation.

#### Tic and Toc Support Multiple Consecutive Timings

The `tic` and `toc` timing functions now support multiple consecutive timings. Call `tic` with an output `t0` to save the current time as the starting time for some operation. When the operation completes, call `toc` with the same `t0` as its input and MATLAB displays the time between that particular tic and toc.

In the following example, MATLAB measures the time used by each function call and, at the same time, measures the time required for the overall operation:

```t0 = tic; t1 = tic; W = myfun1(A,B); toc(t1) t2 = tic; [X,Y] = myfun2(C,W); toc(t2) t3 = tic; Z = myfun3(A,C,Y); toc(t3) toc(t0) ```

You can still call `tic` and `toc` without any arguments. In this case, `toc` just measures the time since the most recent `tic`.

See the function reference page for `tic` or `toc` for more information.

#### New Options for MException getReport

The MException `getReport` method has several new options available in this release. You select these options when you call `getReport`. They give you more control over the content and format of the information displayed or returned by `getReport`.

See the function reference page for `getReport` for more information.

#### what Function Returns Package Information

The `what` function now includes package information in its output display and a `package` field in the structure array that it returns.

List the packages used in the MathWorks Communications System Toolbox™:

```s = what('comm'); s.packages ans = 'crc' 'commdevice' 'commsrc' 'commgui' 'commscope' 'commutils'```

You can also call `what` on a specific package name to see what types of directories and files are in the package directory.

See the function reference page for `what` for more information.

#### addtodate Accepts Hours, Minutes, Seconds, Milliseconds

In previous releases, the `addtodate` function supported modifying a date number by a specified number of years, months, or days. In this release, you can also modify the date by a specified number of hours, minutes, seconds, or milliseconds.

Add 2 hours, 45 minutes, and 17 seconds to the current time:

```d1 = now; datestr(d1) ans = 12-Jun-2008 16:15:38 d2 = addtodate(d1, 2, 'hour'); d2 = addtodate(d2, 45, 'minute'); d2 = addtodate(d2, 17, 'second'); d2 = addtodate(d2, 3000, 'millisecond'); datestr(d2) ans = 12-Jun-2008 19:00:58```

See the function reference page for `addtodate` for more information.

#### Querying Options Added to pause

There are new syntaxes for the `pause` function:

• To see whether pausing is enabled or not, use one of the following commands:

```pause query state = pause('query')```
• To return the previous pause state when enabling or disabling pausing, use one of the following:

```oldstate = pause('on') oldstate = pause('off')```

See the function reference page for `pause` for more information.

#### File Selection Restriction in Import Wizard

This release introduces a change in how you select the source to import using the Import Wizard. In previous releases, you could select and view the contents of any number of files within the wizard before choosing the one to import. As of this release, if you need to import from a different source (a specific file or the system clipboard) than the one you had originally selected, you must exit and restart the Import Wizard. This change gives the Import Wizard increased flexibility in handling different types of files, removes redundancy in the import process, and also removes a potential source of unexpected behavior from the product.

#### Compatibility Considerations

The user interface to the Import Wizard is very much the same as in previous versions of MATLAB. However, you should take note of the following changes:

• The panel named Select Data Source, that appears at the top of the Import Wizard preview dialog box in earlier releases, is no longer available. As before, you select the source file to import, or the clipboard, at the time you activate the Import Wizard. This applies whether you use File > Import Data from the MATLAB Command Window menu or the `uiimport` function at the command prompt. To make a new file or clipboard selection, click the Cancel button in any of the dialog boxes, and then restart the Wizard.

• Calling `uiimport` without a file name displays the following new dialog box. Choosing File opens the Import Data dialog box. Selecting Clipboard opens the wizard with the contents of the clipboard in the preview panel.

• To import from the clipboard using the MATLAB menus, use Edit > Paste to Workspace instead of using File > Import Data , and then change the source to Clipboard. This method is preferred because it is more direct. The capability of switching from file to clipboard within the wizard is no longer supported.

#### Function Handle Array Warning Is Now An Error

The only way to make an array of function handles is to use a cell array. Attempting to create any other type of array of function handles is invalid. For the past several releases, MATLAB has issued a warning if you should attempt to put function handles into any type of array other than a cell array. As of this release, MATLAB throws an error instead of a warning when this is attempted.

Replace

```A = [@sin @cos @tan]; ??? Error using ==> horzcat Nonscalar arrays of function handles are not allowed; use cell arrays instead. ```
with

`A = {@sin @cos @tan};`

#### Compatibility Considerations

If any of your program code attempts to create a regular array of function handles, this code will now generate an error.

#### Two Types of issorted Warnings Are Now Errors

In previous versions, the `issorted` function generated a warning for the following two cases:

• `issorted(x)`, where `x` is a complex integer, and

• `issorted(x,'rows')`, where `x` is an ND array

### Using issorted on a Complex Integer

In this case, a statement such as the following

`issorted(int8(complex(1,2)))`

now issues the error message

```??? Error using ==> issorted ISSORTED on complex inputs with integer class is obsolete. Please use ISSORTED(DOUBLE(X)) or ISSORTED(SINGLE(X)) instead. ```

### Using issorted on an N-D Array

In this case, a statement such as

`issorted(ones(3,3,3),'rows')`

now issues the error message

```??? Error using ==> issorted X must be a 2-D matrix.```

#### Compatibility Considerations

If any of your program code attempts to use either of these types of statements, this code will now generate an error.

#### Possible Conflict with New Keyword: SPMD

This release introduces a new keyword, `spmd`, that, although used solely by the Parallel Computing Toolbox (PCT), may cause conflicts with MATLAB users as well. See spmd Construct in the PCT release notes for more information on this keyword.

#### Compatibility Considerations

Because `spmd` is a new keyword, it will conflict with any user-defined functions or variables of the same name. If you have any code with functions or variables named `spmd`, you must rename them.

#### Do Not Create MEX-Files with DLL File Extensions

In the future, on 32-bit Windows systems, MATLAB will not support MEX-files with a `.dll` file extension. See release note Do Not Use DLL File Extensions for MEX-Files for information on how this might affect you.

#### isequal Is Now Called Explicitly for Contained Objects

When you pass two MATLAB objects to `isequal`, MATLAB dispatches to the `isequal` method of the dominant object (see Object Precedence in Expressions Using Operators). If the dominant object does not overload `isequal`, then MATLAB uses the built-in version.

#### Compatibility Considerations

What is different with this release, is that MATLAB now calls `isequal` explicitly for each contained object. This means that, if any contained object overloads `isequal`, MATLAB calls the overloaded version for that object.

Previously, MATLAB compared contained objects using the built-in `isequal` functionality without regard to any special behavior programmed into overloaded `isequal` methods. The effect of this change is that, for objects that contain other objects and those contained objects overload `isequal`, the overloaded behavior establishes the basis with which MATLAB determines equality for those contained objects.

#### Indexed Assignment with Objects of the Form p(:) = o Now Consistent with MATLAB Language

The behavior of indexed assignment with MATLAB objects is consistent with the behavior of all MATLAB intrinsic types and V5 MATLAB objects. For example, attempting the following assignment, where `d` does not previously exist, gives an error:

```>> d(:) = 5; ??? In an assignment A(:) = B, the number of elements in A and B must be the same.```

MATLAB objects behave in the same way:

```ts_obj = timeseries; t(:) = ts_obj; ??? In an assignment A(:) = B, the number of elements in A and B must be the same.```

#### Compatibility Considerations

In MATLAB Version 7.6 Release 2008a, indexed assignment of the form `p(:) = object` did not result in an error.

#### fopen No Longer Supports VAXD, VAXG, and Cray Machine Formats

Calls to `fopen` with any of the following values for machine format return an error:

• `'vaxd'` or `'d'`

• `'vaxg'` or `'g'`

• `'cray'` or `'c'`

#### Compatibility Considerations

In previous releases, calls to `fopen` with machine format values associated with VAXD, VAXG, and Cray did not result in an error.

To read files in VAXD and VAXG formats, consider the workaround available on the MATLAB Central File Exchange, file ID #22675.

### Graphics and 3-D Visualization

#### Certain Printer Formats and Drivers Now Warn When Used

Going forward, MathWorks is planning to leverage existing operating system (OS) support for printer drivers and devices. As a result, the ability to specify certain print devices using the ```print -d``` command, and certain graphics formats using the ```print -d``` command and/or the `saveas` command, will be removed in a future release.

Graphic Format Drivers
`-pkm``-pkmraw``-tifflzw`

Printer Driver

`print` Command Option String

Canon® BubbleJet BJ10e

`-dbj10e`

Canon BubbleJet BJ200 color

`-dbj200`

Canon Color BubbleJet BJC-70/BJC-600/BJC-4000

`-dbjc600`

Canon Color BubbleJet BJC-800

`-dbjc800`

Epson® and compatible 9- or 24-pin dot matrix print drivers

`-depson`

Epson and compatible 9-pin with interleaved lines (triple resolution)

`-deps9high`

Epson LQ-2550 and compatible; color (not supported on HP®-700)

`-depsonc`

Fujitsu® 3400/2400/1200

`-depsonc `

HP DesignJet 650C color (not supported on Windows OS)

`-ddnj650c`

HP DeskJet 500

`-ddjet500`

HP DeskJet 500C (creates black and white output)

`-dcdjmono`

HP DeskJet 500C (with 24 bit/pixel color and high-quality Floyd-Steinberg color dithering) (not supported on Windows OS)

`-dcdjcolor`

HP DeskJet 500C/540C color (not supported on Windows OS)

`-dcdj500`

HP Deskjet 550C color (not supported on Windows OS)

`-dcdj550`

HP DeskJet and DeskJet Plus

`-ddeskjet`

HP LaserJet

`-dlaserjet`

HP LaserJet+

`-dljetplus`

HP LaserJet IIP

`-dljet2p`

HP LaserJet III

`-dljet3`

HP LaserJet 4.5L and 5P

`-dljet4`

HP LaserJet 5 and 6

`-dpxlmono`

HP PaintJet color

`-dpaintjet`

HP PaintJet XL color

`-dpjxl`

HP PaintJet XL color

`-dpjetxl`

HP PaintJet XL300 color (not supported on Windows OS)

`-dpjxl300`

HP-GL® for HP 7475A and other compatible plotters. (Renderer cannot be set to Z-buffer.)

`-dhpgl`

IBM® 9-pin Proprinter

`-dibmpro`

#### Compatibility Considerations

The following Web site provides more detailed information on the file types that will issue warnings and how to suppress the warnings if desired, as well as a form to provide feedback to MathWorks about your use of these options:

http://www.mathworks.com/support/contact_us/dev/obsoleteprintdevices.html

#### Handle Graphics Not Supported Under -nojvm Startup Option

If you start MATLAB with `matlab -nojvm` (which disables Java) you will receive a warning when you attempt to create or load figures, open GUIs, print or capture figures using `getframe`.

#### Compatibility Considerations

For information, see Changes to -nojvm Startup Option in the Desktop Tools and Development Environment release notes.

### Creating Graphical User Interfaces (GUIs)

#### Undocumented Functions Removed

The following set of deprecated functions, all of which were previously undocumented, have been removed. Alternatives to most of them exist, which are described.

• `axlimdlg` — No alternative

• `cbedit` — No alternative

• `clruprop` — Use `rmappdata` instead

• `ctlpanel` — No alternative

• `edtext` — Set text object's `Editing` property

• `extent` — Get text object's `Extent` property

• `getuprop` — Use `getappdata` instead

• `hidegui` — Set figure's `HandleVisibility` property

• `hthelp` — Use `web` instead

• `layout` — No alternative

• `matq2ws` — Combine `save` + `load` or `uisave` + `uiload`

• `matqdlg` — Combine `save` + `load` or `uisave` + `uiload`

• `matqparse` — Combine `save` + `load` or `uisave` + `uiload`

• `matqueue` — Combine `save` + `load` or `uisave` + `uiload`

• `menubar` — The string `'none'`

• `menuedit` — No alternative

• `pagedlg` — Use `pagesetupdlg` instead

• `setuprop` — Use `setappdata` instead

• `umtoggle` — Set uimenu's `Checked` property

• `wizard` — Use `guide` instead

• `ws2matq` — Combine `save` + `load` or `uisave` + `uiload`

#### Compatibility Considerations

If you have developed MATLAB code that uses any of the above undocumented functions, you must remove such calls or replace them with other code, as suggested within the above bullets.

#### Handle Graphics Not Supported Under -nojvm Startup Option

If you start MATLAB with `matlab -nojvm` (which disables Java) you will receive a warning when you attempt to create or load figures, open GUIs, print, or capture figures using `getframe`. For more information, see Changes to -nojvm Startup Option in the Desktop Tools and Development Environment release notes.

#### New Menu Options to Hide or Show GUIDE Toolbar and Status Bar

Two new menu options in GUIDE let you hide/show the GUIDE toolbar and status bar. By default both are visible, but you can deselect Show Toolbar, Show Status Bar, or both from the View menu to make the layout area larger.

#### Compatibility Considerations

The GUIDE Preferences option Show Toolbar is no longer available. Use Show Toolbar from the GUIDE View menu instead.

#### GUIDE Status Bar Now Shows Tag Property of Selected Object

The GUIDE Layout Editor now shows the `Tag` property of any object you select, in the left corner of the status bar that runs along its bottom. This display saves you from having to open the Property Inspector to read `Tag` names. Information in the status bar is read-only; you still need to use the Property Inspector to change a component's `Tag`.

#### Four New Major GUI Examples

The Creating Graphical User Interface documentation has four new extensive examples of building GUIs with GUIDE and programmatically. All of them feature uitables, a feature introduced in R2008a, and all the GUIs plot data. The new examples are:

This release includes FIG- and code files for all these examples. The documentation discusses many of their callbacks and includes hyperlinks to code in the code files.

### External Interfaces/API

#### Do Not Use DLL File Extensions for MEX-Files

In the future, on 32-bit Microsoft Windows systems, MATLAB will not support MEX-files with a `.dll` file extension. In MATLAB Version 7.7 (R2008b), if you run a MEX-file with a `.dll` file extension, MATLAB displays a warning.

Additionally, if you use the `mex` function with the `-output` switch to create a MEX-file with a `.dll` extension, MATLAB displays a warning. If you use the `-output` switch to name a MEX-file, you do not need to provide a file extension. MATLAB automatically appends the appropriate extension. For example, the following command creates a MEX-file named `newtest.mexw32`:

`mex mytest.c -output newtest`

#### Compatibility Considerations

You must recompile MEX-files with a `.mexw32` file extension. This is the default of the `mex` command.

#### MEX-Files Must Be Recompiled When -largeArrayDims Becomes Default MEX Option

In a future version of MATLAB, the default `mex` command will change to use the large-array-handling API. This means the `-largeArrayDims` option will be the default. For information about migrating your MEX-files to use the large-array-handling API, see the Technical Support solution `1-5C27B9`.

#### Compatibility Considerations

In the near future you will be required to update your code to use the new API and to recompile your MEX-files. You should review your source MEX-files and `mex` build scripts.

#### New Compiler Support

MATLAB Version 7.7 (R2008b) supports these new compilers for building MEX-files:

### Microsoft Windows 64-bit and 32-bit Platforms

• Microsoft Visual Studio 2008 Express Edition

#### Compiler Support to Be Phased Out

The following compilers are supported in Version 7.7 (R2008b), but will not be supported in a future version of MATLAB.

### Windows (32-bit) platform

• Intel Visual Fortran Version 9.1

• Microsoft Visual Studio .NET Version 7.1

• Open Watcom Version 1.3

### Windows (64-bit) platforms

• Intel Visual Fortran Version 9.1

### Solaris SPARC (64-bit) platform

• Sun Studio 11 cc / CC Version 5.8

• Sun Studio 11 f90 Version 8.2

#### Use mxDestroyArray to Release Memory for mxArray

The documentation for the `mxSetCell`, `mxSetField`, and `mxSetFieldByNumber` functions in the MATLAB C and Fortran API incorrectly instructs customers to use `mxFree` to release memory for any `mxArray` returned by `mxGetCell`, `mxGetField`, or `mxGetFieldByNumber`.

#### Compatibility Considerations

The correct function to use to release memory for an `mxArray` is `mxDestroyArray`. Calling `mxFree` on an `mxArray` only frees the array header, but does not actually free the data itself and can result in a memory leak.

To help diagnose this problem, MATLAB issues a warning if calling `mxFree` on an `mxArray` could cause memory corruption. In future versions of MATLAB, this condition might result in a segmentation violation.

#### New Function Displays Information about MEX Compiler Configurations

The `mex.getCompilerConfigurations` function displays information about the selected compiler and associated switches and options that MATLAB uses to build a MEX-file. The selected compiler is the one you choose when you run the `mex` `-setup` command. For more information, see Building MEX-Files.

#### New Functions to Catch Errors in MEX-Files Replace mexSetTrapFlag

Two new MEX library functions have been added to the MATLAB C and Fortran API.

The `mexCallMATLABWithTrap` function, like `mexCallMATLAB`, lets you call MATLAB functions from within a MEX-file. In addition, `mexCallMATLABWithTrap` lets you catch, or trap, errors. Using this function for exception handling is more flexible that using `mexCallMATLAB` with the `mexSetTrapFlag` function.

Likewise, the `mexEvalStringWithTrap` function adds error handling to the `mexEvalString` function.

#### Compatibility Considerations

In the near future you will be required to update your MEX-files to remove use of the `mexSetTrapFlag` function.

#### "Duplicate dylib" Warning on Macintosh Systems

When compiling MEX-files on an Apple Mac OS Version 10.5 system you can ignore a warning about a duplicate library `libz.1.dylib`. The MEX-file builds properly and runs as expected. The warning message contains the following information:

`ld: warning, duplicate dylib`

#### Microsoft Visual Studio "X64 Compilers and Tools" Required for 64-bit Systems

If you use Microsoft Visual Studio with MATLAB on 64-bit systems, you must choose "X64 Compilers and Tools" when you install the following products:

• Visual Studio 2008 Express Edition

• Visual Studio 2008 Professional Edition

• Visual Studio 2005 Professional Edition

#### Run-Time Libraries Required for Applications Built with Microsoft Visual Studio 2008 Compiler

If you distribute a MEX-file, an engine application, or a MAT-file application built with the Visual Studio 2008 compiler, you must provide the Visual C++ run-time libraries. These files are required to run applications developed with Visual C++ on a computer that does not have Visual C++ 2008 installed. For information on locating the Microsoft Visual C++ 2008 Redistributable Package (x86), containing `vcredist_x86.exe` and `vcredist_x64.exe`, consult your Microsoft documentation.

#### Do Not Use get or set Function to Manage Properties of Java Objects

If you want to read or update a property of a Sun Java object created in MATLAB using the Java class constructor, do not use the MATLAB `get` or `set` functions on the property. For example, if you create a Java object called `javaObject` that has a property called `PropertyName`, the following commands might cause memory leaks and will be deprecated in a future version of MATLAB:

```propertyValue = get(javaObject, 'PropertyName'); set(javaObject, 'PropertyName', newValue); ```

#### Compatibility Considerations

In future versions of MATLAB, using `get` or `set` on Java objects to manage the properties will generate an error. The correct commands to use are:

```propertyValue = javaObject.getPropertyName; javaObject.setPropertyName(newValue); ```

#### COM Objects Might Display Different Number of Supported Events

If you use events from COM servers implementing event interface versioning, COM objects created with MATLAB Version 7.4 (R2007a), Version 7.5 (R2007b), or Version 7.6 (R2008a) might have a different number of supported events than COM objects created with MATLAB Version 7.7 (R2008b) or any version prior to 7.4.

#### Compatibility Considerations

Calling the `events (COM)` function on affected types of COM server components returns a list of events for the latest [default] interface version which might be different from the list of events displayed by MATLAB Version 7.4, Version 7.5, or Version 7.6.

If an event in an older COM event interface version is no longer supported or renamed in the newer interface version, the `registerevent` function generates an error when such an event is used in an `.m` file.

## R2008a

New Features, Bug Fixes, Compatibility Considerations

### Desktop Tools and Development Environment

#### Desktop New Features Video

For an overview of the major new features in the MATLAB Desktop Tools and Development Environment area, watch this video demo. You can also access this and other video demos by selecting the Demos tab in the Help browser, and then selecting MATLAB > New Features in Version 7.6.

#### Startup and Shutdown

New features and changes introduced in Version 7.6 (R2008a) are:

### Windows Platforms — Startup Changes, Including Use of My Documents/MATLAB or Documents/MATLAB Directory

On Microsoft Windows platforms, when MATLAB starts, it automatically adds the `My Documents/MATLAB` directory (or `Documents/MATLAB` on Windows Vista™) to the top of the MATLAB search path. This directory is known as the `userpath`. If you remove the `My Documents/MATLAB` (or `Documents/MATLAB`) directory from the search path and save the changes, either using the Set Path dialog box or using the `rmpath` and `savepath` functions, the MATLAB search path will not include the `userpath` directory at the next startup. On Windows platforms, the `userpath` is also the default startup directory.

Use the new function, `userpath`, to view the current value, clear the value so the directory is not on the search path and is not the startup directory, specify a different value, or reset the value to the default. For more information, see Default Startup Directory (Folder) on Windows Platforms and the `userpath` reference page.

#### Compatibility Considerations

In previous versions, MATLAB automatically added the ```My Documents/MATLAB``` directory (or `Documents/MATLAB` on Windows Vista platforms) to the search path upon startup, even if you had removed it from the path and saved your changes during the previous session.

### UNIX Platforms — Startup Changes

On UNIX platforms, when MATLAB starts, it automatically adds the `userhome/Documents/MATLAB` directory to the top of the MATLAB search path. This directory is known as the `userpath`. Use the new function, `userpath`, to view the current value, clear the value so the directory is not on the search path, specify a different value, or reset the value to the default. You can also specify that `userpath` be the MATLAB startup directory by setting the value for the environment variable `MATLAB_USE_USERWORK` to `1` prior to startup. For more information, see Startup Directory on UNIX Platforms and the `userpath` reference page.

#### Compatibility Considerations

In previous versions, no directories were added to the search path upon startup.

### Macintosh Platforms — Startup Changes

On Apple Macintosh platforms, when MATLAB starts, it automatically adds the `userhome/Documents/MATLAB` directory to the top of the MATLAB search path. This directory is known as the `userpath`. Use the new function, `userpath`, to view the current value, clear the value so the directory is not on the search path, specify a different value, or reset the value to the default. If you start MATLAB from a shell, you can also specify that `userpath` be the MATLAB startup directory by setting the value for the environment variable `MATLAB_USE_USERWORK` to `1`.

For more information, see Startup Directory on <trademark Macintosh Platforms and the `userpath` reference page.

#### Compatibility Considerations

In previous versions, no directories were added to the search path upon startup.

### Macintosh Platforms — Define Startup Options Using New Dialog Box

On Apple Macintosh platforms, you can specify startup options using the new Start MATLAB Settings dialog box. The first time you start MATLAB Version 7.6 (R2008a), the Start MATLAB Settings dialog box opens automatically. It does not open automatically on subsequent startups; to open the dialog box, double-click ```Start MATLAB Settings```, located in the same directory as the MATLAB application.

You can set these options and others:

• How you will interact with MATLAB (desktop or specified shell)

• The startup directory; the default is `userhome/Documents/MATLAB`

• Statement MATLAB runs upon startup

You can create and save multiple startup options files, each with different settings. For more information, see Startup Options.

### Macintosh Platforms — Run Startup Diagnostics

Upon startup on Macintosh platforms, MATLAB automatically runs diagnostics to ensure your system has the required X11 and Sun Microsystems Java applications. If there are no problems, MATLAB starts as expected. If there is a problem, MATLAB displays a dialog box informing you of the problem and how to address it. You can run these diagnostics manually from the Start MATLAB Settings dialog box, using items in the Diagnostics menu.

### Updated Version of JVM Software on Solaris Platform

MATLAB is now using Sun Microsystems JVM Version 6 on the Sun Microsystems Solaris platform.

#### Compatibility Considerations

If you use a specific version of Sun Microsystems Java with MATLAB on the Solaris platform, this change might impact your work.

### Changes to Abnormal Termination Process

When MATLAB encounters a serious problem, such as a segmentation violation, a dialog box opens to notify you about the problem. From the dialog box, you can close MATLAB, or try to save your work in progress before closing.

If you try to save your work in progress, be aware that MATLAB is in an unreliable state and you should exit MATLAB as soon as you finish saving your work. The Command Window displays the message ```Please exit and restart MATLAB``` to the left of the prompt, which reminds you to discontinue use. For more information, see Abnormal Termination.

#### Compatibility Considerations

In previous versions, when MATLAB encountered a serious problem, an error message appeared in the Command Window that instructed you to close MATLAB.

With multithreaded computation enabled, a platform-specific dialog box appeared, from which you immediately closed MATLAB.

#### Desktop

New features and changes introduced in Version 7.6 (R2008a) are:

### Customize the MATLAB Desktop and Editor Toolbars

Rearrange, add, or remove buttons and other controls from the MATLAB desktop or Editor toolbars using File > Preferences > Toolbars. Alternatively, right-click a toolbar and select Customize from the context menu.

There are new buttons you can add to the MATLAB desktop toolbar:

• Preferences, , which displays the Preferences dialog box, open to the pane last used

• Demos, , which displays the listing of Demos in the Help browser

You can also add Save All and Save As buttons to the Editor toolbar.

You can change the position of the toolbars within a tool, for example, putting both the Editor and Editor cell mode toolbars next to each other instead of stacked. To move a toolbar, grab the anchor for a toolbar, then drag the toolbar to the new location.

### Clear a Browser with New Method

Clear an open browser in MATLAB with a new `close` method. For example, open a browser to display the MathWorks Web site by running `[stat,h1]=web('http://www.mathworks.com')`. Then `close(h1)` clears `mathworks.com` from that browser window. For more information, see the reference page for the `web` function.

### Check for Updates Feature Enhanced

When you select Help > Check for Updates, the dialog box now allows you to see the latest versions for all MathWorks products, or just those you install. You can also access release notes for each product from the dialog box. For more information, see Check for Software Updates.

### Command History Preference — Default Value Changed

The default value for the Command History preference, Save after `n` commands, is now 1. This allows you to more easily rebuild your state in MATLAB if MATLAB terminates abnormally, such as after a power failure. For more information about this preference, see Command History Preferences.

#### Compatibility Considerations

Previously, the default value for the Save after `n` commands preference was 5.

### Preferences for Help on Selection

When you click a function name in the Command Window or Editor, and then press F1 or select Help on Selection from the context menu, the help appears in a pop-up window by default. Now, you can specify that the help appear in the Help browser rather than in a pop-up window via the new Help on Selection preference. For more information, see Help Preferences.

### Slight Reordering of Products in Help Browser

In the Help browser, the order of some documentation names in the Contents pane and the Product Filter preference dialog box has changed slightly. Documentation now appears in this order:

• Release Notes (general)

• Installation

• MATLAB

• Toolboxes and other products based on MATLAB, arranged alphabetically

• Blocksets and other products based on Simulink, arranged alphabetically

• Link and target products, arranged alphabetically

#### Workspace, Search Path, and File Operations

New features and changes introduced in Version 7.6 (R2008a) are:

### Array Editor Renamed to Variable Editor; Offers Enhanced Support for Structures and Classes

The Array Editor has been renamed to the Variable Editor, which better reflects its support for non-array data such as structures and properties.

The Variable Editor now reports, just below the toolbar, the class and size of the selected variable. For many classes, there is also a link to help for the class. To view a structure in the Variable Editor, double-click one of its elements. The resulting display is much like the display of that element in the Workspace browser, showing the Class, Value, Size, Min, Max, and other information. For more information about the Variable Editor, see Viewing and Editing Workspace Variables with the Variable Editor.

Use the data brushing button on the Variable Editor toolbar to mark observations on graphs and then remove or save them to new variables. For more information, see Data Brushing for Graphs and Linked Variables.

The Variable Editor supports the new MATLAB class system. Double-click an object in the Workspace browser, and it opens in the Variable Editor. The Variable Editor displays the object, the class, and the properties of the object.

#### Compatibility Considerations

In previous versions, the Variable Editor was called the Array Editor. Starting in R2008a, MATLAB Version 7.6, the tool will be referred to as the Variable Editor.

### Search Path — Changes to User Portion

By default, MATLAB adds a directory to the top of the search path upon startup, known as the `userpath` directory. By default, its value is `Documents/MATLAB` on Windows platforms, or `My Documents/MATLAB` on Windows Vista platforms. On UNIX and Macintosh platforms, the default directory is `userhome/Documents/MATLAB`. Use the new function, `userpath`, to specify a different directory, clear the `userpath` value, or reset it to the default value. On UNIX and Macintosh platforms, you can specify additional directories for MATLAB to add to the top of the search path upon startup using the `MATLABPATH` environment variable. When you remove the `userpath` portion of the search path, it clears the value for `userpath` and might impact the startup directory. For related information, see Startup and Shutdown. For details see Locations for Storing Your Files and the `userpath` reference page.

#### Compatibility Considerations

In previous versions, on Windows platforms, MATLAB added the default directory to the search path upon startup, even if you removed it and saved the changes to the path. On UNIX and Macintosh platforms, MATLAB did not add a directory to the search path on startup.

### New Context Menu Options in Current Directory Browser

The context menu, which you access by right-clicking anywhere within the Current Directory browser, provides these three new options for creating M-files in the current directory:

• New > Blank M-File

Creates an empty M-file

• New > Function M-File

Creates an M-file with a template for writing an M-file function

• New > Class M-File

Creates an M-file with a template for writing an M-file class definition

#### Compatibility Considerations

The New > M-File option is replaced by the New > Function M-File option, which has the same effect.

### File and Directory Comparisons Tool

The File Comparisons tool is now called the File and Directory Comparisons Tool. In addition to enabling you to compare lines in two text files, it now enables you to:

• Compare variables in two MAT files

• Determine whether the contents of two binary files are the same

• Compare two directories to determine which file names are unique to each directory

• Compare two directories to determine if files with the same name in each directory have the same content

See Comparing Files and Folders for details.

### Profiling — Setting Intel Multi-Core Processors

If your system uses Intel multi-core chips, and you plan to profile using CPU time, set the number of active CPUs to 1 before you start profiling. See Intel Multi-Core Processors — Setting for Most Accurate Profiling on Windows Systems for details.

#### Editing and Debugging M-Files

New features and changes introduced in Version 7.6 (R2008a) are:

### Stand-Alone Editor No Longer Provided

The MATLAB stand-alone Editor (`meditor.exe`) is no longer provided. Instead of the stand-alone Editor, you can use the MATLAB Editor.

#### Compatibility Considerations

Some users have preferred the stand-alone Editor to the MATLAB Editor because of slightly better startup performance and because it does not require a MATLAB software license. For those situations, you can use any text editor you have, such as UltraEdit or Emacs.

### Run/Continue Button Now Two Separate Buttons

The Continue button is now separate from the Run button. Previously, the Run button served as both the Run and Continue button.

#### Compatibility Considerations

You now use the Run button to execute a run configuration and the Continue button to continue execution of an M-file after a breakpoint during debugging. See Run MATLAB Files in the Editor and Step Through a File for details.

### Evaluate Entire File Button Off Toolbar by Default

The Evaluate Entire File button, , is no longer on the Editor Cell Mode toolbar by default.

#### Compatibility Considerations

Previously, the Evaluate Entire File button was on the Editor Cell Mode toolbar by default. You can put the Evaluate Entire File button back on the toolbar by customizing it. See Customize the MATLAB Desktop and Editor Toolbars for more information.

### TLC and XML Syntax Highlighting Supported

You can specify preferences for TLC and XML syntax highlighting in the Editor/Debugger Language Preferences panel by selecting File > Preferences > Editor > Language and then, in the Language drop–down menu choosing TLC or XML/HTML.

### Code Folding Enhanced to Support More Language Constructs

You can enable code folding for all these programming constructs:

• Cells used for rapid code iteration and publishing

• Class code

• Class enumeration blocks

• Class event blocks

• Class method blocks

• Class properties blocks

• For and parfor blocks

• Function and class help

• Function code

• If/else blocks

• Switch/case blocks

• Try/catch blocks

• While blocks

Prior to MATLAB Version 7.6 (R2008a), code folding was supported for function code and function help only.

See Code Folding — Expand and Collapse Code Constructs for details.

### mlint Function Uses Preference Settings when Java Software is Available

When Sun Microsystems Java software is available, the `mlint` function honors the M-lint preferences that you specify using the M-Lint Preferences dialog box (File > Preferences > M-Lint).

In addition, the `'–config=settings.txt'` option to the `mlint` function enables you to override the current default M-Lint preferences settings with a settings file that you previously created and saved using the M-Lint Preferences dialog box. If you use the `'–config=settings.txt'` option, you must specify the full path to the file. If you prefer that `m-lint` ignore all M-Lint preferences and use the factory default settings instead, specify the `'–config=factory'` flag. See `m-lint` for details.

#### Compatibility Considerations

Previously, the `mlint` function always used the factory default settings, regardless of the M-Lint preferences that you set. To restore that behavior, use the `'–config=factory'` flag on the `mlint` function.

### New M-Lint Warning Related to the MException Class

MATLAB Version 7.6 (R2008a) adds a new M-Lint warning related to the `MException` class. This warning, along with two M-Lint warnings added in MATLAB Version 7.5 (R2007b), intentionally make it difficult for you to completely ignore an error without receiving an M-Lint warning. It is a best practice to check error information even when an error is expected or frequent, so that you can rule out unexpected situations.

The three messages are as follows—the first is the one added in MATLAB Version 7.6 (R2008a):

• ```LASTERR and LASTERROR are better replaced by an identifier on the CATCH block. See doc CATCH```.

• ```The value assigned here to variable 'x' might never be used```.

This message appears when the code contains a `catch` statement that is never used.

• `TRY statement without a CATCH`.

For example, suppose you want to read options from a file, `options.txt`, but it is acceptable if that file is not present. You might write the following code, expecting the `read_options` program to throw an error if the file is not present:

```options = {}; try options = read_options( ‘options.txt' ); end ```

The problem with the preceding code is that the file might be present, but its permissions may prevent the program from reading it. The program ignores the file, and potentially confuses the user, who knows the file is there. Better code for accomplishing the task is as follows, which assigns a structure value to the variable `err` if an error is thrown in the `try` block. The structure value contains information about the error that was thrown.

```try options = read_options( ‘options.txt' ); catch err if strcmp( err.identifier, ‘Program:ReadOptions:NoOptionsFile' ) options = {}; else rethrow( err ); end end ```

Using this code, if a problem other than the "file is missing" error occurs, MATLAB reports the error to the user. For instance, MATLAB reports an error if the file format is incorrect, or if the file has the wrong permissions.

If you feel comfortable ignoring the errors completely, it is probably best to use the `try` statement with no `catch` statement, and suppress the M-Lint warnings that result. You can suppress the warnings through the M-Lint preferences or by placing the `%#ok` pragma at the end of the line that triggers the message. However, The MathWorks suggests that if you suppress an M-Lint message, you include a comment in your code indicating why you think it is appropriate to ignore the message.

For more information about the `MException` class, see the Error Handling section in the MATLAB Programming Fundamentals documentation.

### dbstop and dbclear Functions — Option to Specify File Not on Path

The `–completenames` option to the `dbstop` and `dbclear` functions enables you to set and clear breakpoints, respectively, for M-files that are not on the search path in MATLAB. See `dbstop` and `dbclear` for details.

### edit Function Can Create New File in Existing Subdirectory

The edit function now allows you to specify a file that is not in the current directory. If the file does not exist, the edit function creates it in the directory you specify. However, the directory, must exist; the edit function will not create a directory for you. See `edit` for details.

### Nest Cells for Rapid Code Iteration; Includes Changes to Cell Highlighting

You can nest cells in an M-file, including within functions and control statements, such as `for` loops and `if-then` blocks. This gives you greater control over how a published document appears. This nesting ability also enables you to evaluate subsections of code on a finer grain. See Nest Cells for Finer Control for details.

#### Compatibility Considerations

With the introduction of nested cells, cells definitions result in cell highlighting that looks different from previous releases. See Define Code Cells for details.

#### Publishing M-Files

New features and changes introduced in Version 7.6 (R2008a) are:

### Publish Functions and Scripts Using Publish Configurations; Includes Replacement of Publishing Preferences

In the Editor, you can now do the following when publishing M-file code:

• Specify code that you want MATLAB to evaluate before publishing the code, including input arguments for functions

• Specify publishing settings, such as an output directory and file format, that you can save and reuse as a group

To create a publish configuration, first open an M-file in the Editor. Then, select File > Publish Configurations for `filename` > Edit Publish Configurations for `filename`. In the resulting Edit M-File Configurations dialog box, modify the MATLAB expression, specify Publish settings, and name the publish configuration. For more information, see Creating a Publish Configuration for a MATLAB File.

#### Compatibility Considerations

Previously, preferences for publishing and publishing images were available on the Preferences dialog box, which you accessed by selecting File > Preferences > Editor/Debugger and then choosing the Publishing or Publishing Images node. Now you set these preferences when you create or update a publish configuration by using the Publish settings options on the Edit M-file Configurations dialog box.

The Edit M-file Configurations dialog box continues to provide support for creating configurations that enable you to run an M-file. These are now called run configurations to differentiate them from publish configurations.

### Nest Cells for Finer Control

You can nest cells in an M-file, including within functions and control statements, such as `for` loops and `if-then` blocks. This gives you greater control over how a published document appears. This nesting ability also enables you to evaluate subsections of code on a finer grain when using rapid code iteration.

You can insert white space before the double percent (`%%`) characters that specify a cell break (which is also referred to as a cell divider). This helps to improve readability of the M-file when the cell break is within indented code. In prior releases, the `%%` characters had to be in the first column of the code.

The following image shows a simple example of an M-file with nested cells.

If you publish the file to HTML (reducing the size of the images), the cell break nested within the `for` loop causes MATLAB to publish each iteration of the `for` loop as it evaluates the code in the loop:

Similarly, the cell break within the `for` loop enables you to run the M-file and experiment with the marker size value without the need to save the file between adjustments:

For more information see Mark Up MATLAB Code for Publishing and Evaluate Subsections of Files Using Code Cells.

#### Compatibility Considerations

In prior releases, the cell break characters (`%%`) had to be in the first column of the code for the Editor to recognize the characters as a cell break. This is no longer true, the Editor now recognizes these characters as a cell break regardless of the amount of white space that precedes them.

Furthermore, with the introduction of nested cells, inserting cell breaks in this release has different effects than in the previous release. In the previous release, if you inserted a cell break before a subfunction declaration, MATLAB created two cells; one above the cell break and one below it. Now, if you insert a cell break, MATLAB also inserts implicit cell breaks.

In the example shown, it inserts two implicit cell breaks in the subfunction where you inserted the explicit cell break; one on the first line of the subfunction and one on the last line of the subfunction. This results in three cells: one containing the entire file, one containing the `collatzplot_new` function, and one containing just the Collatz Problem cell title.

Nested cells are introduced to support function publishing.

See Nested Code Cells for details.

### Publish Button Moved

The Publish button, , is now located on the Editor toolbar.

#### Compatibility Considerations

Previously, the Publish button was located on the Editor Cell Mode toolbar. Now you find it on the Editor toolbar.

If the comments in your M-file include trademarked terms, you can format the comment to produce a trademark symbol (™) or registered trademark symbol (®) in the published output. See Trademark Symbols for details.

### Specifying Code for MATLAB Software to Evaluate with the publish Function

Use the `codetoEvaluate` option to the `publish` function to specify code that you want MATLAB software to evaluate when it publishes an M-file. By default, this is the code in the M-file. However, if you want, you can use this option to specify additional code or alternative code for MATLAB to evaluate. For example, you might want MATLAB to evaluate code that calls the M-file that you are publishing.

### stopOnError Option No Longer Available with publish Function

The `stopOnError` option is no longer available for the `publish` function. MATLAB software will always stop when an error occurs, unless you add code to handle the error.

#### Compatibility Considerations

To have MATLAB continue processing code when an error occurs, handle the error using a `try-catch` statement. For more information, see The try-catch Statement.

### Include Snapshot of M-file Output in Published Document

You can include snapshots of output that an M-file generates within a published document. Select Cell > Insert Text Markup > Force Snapshot. This menu option inserts the `snapnow` function into your M-file code. This is particularly useful when you have code that generates numerous images that you want to include in the published document. See Force a Snapshot of Output for details.

The following image, for example, shows a published document that uses this feature (with the size of the images reduced). Notice that the published images appear after the `for` loop that generates them.

### Locale Information Added to MATLAB Documentation

Information about using locale in MATLAB can be found in Internationalization in the Desktop Tools and Development Environment documentation.

### Changes to Locale Database

#### Windows Platform Changes

On Microsoft Windows systems, users can select the Pashto language with the Afghanistan country code. This locale setting is `ps_AF.1256`.

#### Macintosh OS X Platform Changes

On Apple Macintosh OS X systems, for users selecting the Chinese language and the China country code, the locale setting is `zh_CN.gb2312`. The previous setting was `zh_CN.GBK`.

### Mathematics

MATLAB software now uses new versions of the Basic Linear Algebra Subroutine (BLAS) libraries. For Windows, Intel Mac, and Linux platforms, MATLAB software supports the Intel Math Kernel Library (MKL) version 9.1. For the Solaris platform, MATLAB software uses the Sun Performance Library from Sun Studio 12.

MATLAB software now uses Version 3.1.1 of the Linear Algebra Package (LAPACK) library.

#### More Multithreaded Support For Elementwise Math Functions With Warnings

Multithreaded support has been added to elementwise math functions that may generate warnings: `rdivide`, `ldivide`, `log`, `log2`, and `rem`.

#### New Algorithms for ldl, logm, and funm Functions

The `ldl`, `logm`, and `funm` functions include new algorithms based on recent numerical methods research.

#### Functions and Properties Being Removed

Function or Property NameWhat Happens When You Use Function or Property?Use This InsteadCompatibility Considerations
`betacore`Errors`betainc`Replace all existing instances of `betacore` with `betainc`.
`colmmd`Errors`colamd`Replace all existing instances of `colmmd` with `colamd`.
`flops`ErrorsNoneRemove all existing instances of `flops`. With the incorporation of LAPACK in MATLAB version 6, counting floating-point operations is no longer practical.
`symmmd`Errors`symamd`Replace all existing instances of `symmd` with `symamd`.
`quad8`Errors`quadl`Replace all existing instances of `quad8` with `quadl`.
`table1`Errors`interp1` or `interp1q`Replace all existing instances of `table1` with `interp1` or `interp1q`.
`table2`Errors`interp2`Replace all existing instances of `table2` with `interp2`.
`bessela`Errors`besselj`Replace all existing instances of `bessela` with `besselj`.
`beta` using three input argumentsErrors`betainc` using three input argumentsReplace all existing instances of `beta` using three input arguments with `betainc` using three input arguments.

### Data Analysis

#### Data Brushing for Graphs and Linked Variables

This release introduces two new interactive tools for data exploration:

• Data brushing — For marking observations on graphs, allowing you to remove or save them to new variables

• Data linking — For connecting graphs with data sources (workspace variables) to automatically and interactively update them

In addition, figure windows have a new banner, called the linking and brushing message bar. By default, when you plot data into a figure (i.e., add axes), an informational banner appears across top of the figure that looks like this.

In the figure's message bar, click the first two links to read about these new tools. Click the Play video link to open a nine-minute video tutorial about the tools in a browser window (the video also describes new GUI-building features.) To dismiss the banner, click the X. Once you do, the banner only reappears on subsequent plots if you select Show linking and brushing message bar in the MATLAB Preferences Confirmation Dialogs panel.

 Note:   The linking and brushing message bar can obscure a plot's title. Also, if you do not dismiss the message bar, it is visible in images of figures captured with `getframe`, but it does not print. See ??? for details.

Use data brushing when you want to isolate observations in a 2-D or 3-D graph for separate analysis, or to remove outliers or noisy data points. Data brushing can be applied to most graphs (some plot types do not support brushing). Data brushing is an exclusive, persistent mode. That is, when using it, you cannot use other figure tools, but the results of brushing data persist when you select a different tool or no tool.

Use data linking to make plots dynamically respond to changes in the variables they plot. Data linking applies to most graphs with identifiable data sources and operates at the figure level. Data linking is not modal and persists until you toggle it off or the connection between a plot and its data sources is broken.

The two tools work smoothly together and with the Variable Editor to visually highlight brushed observations and the data values they represent:

• Brushing data-linked observations on a graph highlights them on other graphs that display them.

• Brushing highlights values in the Variable Editor when a brushed variable is displayed there.

• Using the Brush tool in the Variable Editor highlights values you brush that appear in linked plots.

• Changing values of variables causes linked graphs displaying them to update with the changes.

• Clearing variables disconnects them from all linked figures displaying graphs of them

You can modify variables from the command line, the Variable Editor, or with M-files. When used within functions, data linking operates in the function's workspace, not the base workspace. This is also the case when debugging.

### Data Brushing Tool

All figure windows that contain axes now include a data brushing tool (the Brush/Select data icon ) that lets you enter and exit brushing mode and select a color with which to brush observations. The tool draws selection rectangles (in 2-D plots) or prisms (in 3-D plots) and permits you to select discontiguous regions and negate previously brushed observations. Undo is also supported.

The Brush/Select data tool is a "split button" control with a brush icon on the left and a drop-down color palette on the right. When you depress the brush icon, you are in brushing mode; all data observations you select are highlighted with the current brush color. The figures below illustrate these operations.

If you leave data brushing mode to zoom, pan, or edit the plot, all brushed observations remain highlighted. You can then reenter brushing mode and pick up where you left off. Brush marks are not preserved when you save a figure and reopen it from the FIG-file, however.

### Data Brushing API

Use the `brush` function to turn brushing on and off, and to select a color for brushing graphs. You can change brush colors on the fly with either the API or with the Brush tool.

All figure windows that contain axes now include a data linking tool (the Linked Plots button ) to toggle linked mode on and off (the default). When you toggle it on, an information bar appears underneath the lowest toolbar on the figure, as shown below. It displays what variables are linked to each series (data sources for x-, y-, and z- data in the graphs).

On the left side of the information bar is a drop-down menu that displays the symbolism and identifies the data source for each series currently linked. On the right side is an Edit button that opens the Data Source Properties dialog box in which you can set display names and data sources. Usually it is possible to unambiguously determine what data sources a graph has, but sometimes you need to indicate what data source to use, for example, when you plot a subrange of a data array. The information bar explains that you need to do this as soon as you turn on data linking; then, you can open the Data Source Properties dialog box to identify your data source(s).

Use the `linkdata` function to turn data linking on or off for the current figure or for a figure for which you supply a handle.

#### Compatibility Considerations

If you capture figure windows with the `getframe` function, their images will include the message bar if the figures being captured possess them. To prevent this from happening, click the X on the right side of the message bar to dismiss it before calling `getframe`. Subsequent figures will not display a message bar. If you want to restore the message bar at a later time, select Show linking and brushing message bar in the MATLAB Preferences Confirmation Dialogs panel.

If the figure has a title, its Linked Plots/Data Brushing message bar can obscure it. This is the case for figures at the default size. Remove the message bar if you want a title to display.

### Programming

Multithreaded computations, introduced in R2007a, are now on by default.

#### Compatibility Considerations

To disable multithreaded computations, open the Preferences dialog, choose Multithreading, and then disable it explicitly.

#### Enhancements to Object-Oriented Programming Capabilities

Major enhancements to object oriented programming capabilities enables easier development and maintenance of large applications and data structures.

New features include:

For a full description of object-oriented features, see Object-Oriented Programming.

#### Packages for Classes and Functions

This release provides the capability to manage name space by placing classes and functions in packages.

#### Clear Variables with Exceptions

With the new `clearvars` function, you can specify which variables you do not want cleared from memory.

#### Information on the State of Memory

The new `memory` function provides memory usage information such as largest block available, allowing you to diagnose memory problems on Microsoft Windows platforms.

#### Compatibility Considerations

The memory function existed in previous versions of MATLAB, but its purpose has changed. Previously, `memory` provided help text on how to free additional memory space for your MATLAB application. The function now returns information on the current state of memory use and availability in your system.

With the new `onCleanup` function, you can specify one or more tasks for MATLAB to perform just before exiting the current function.

#### New Functions

NameDescription
`clearvars`Clear variables from memory
`memory`Display memory information
`onCleanup`Cleanup tasks at function completion

#### Extended JIT Support

JIT/Accelerator support now extends to statements executed at the MATLAB Command Line and in cell mode in the MATLAB Editor. This provides improved performance in these environments.

#### Enhancements to Image Information and Writing Functions

The image information and writing functions have the following enhancements:

• `imfinfo` can now return Exif data for JPEG or TIFF format image files. Information specific to the digital camera can be found in the `'DigitalCamera'` field, while any global positioning system information can be found in the `'GPSInfo'` field.

• `imwrite` now supports the `'RowsPerStrip'` parameter that you can use to specify how many image rows to include in a strip when writing TIFF files. By default, `imwrite` limits the number of rows included in a strip so that the size of the strip does not exceed 8 KB. Now you can specify strips of larger size.

#### Compression of -v7.3 MAT-Files

You can store data items that are over 2 gigabytes in size in a MAT-file using the `-v7.3` option for the `save` function. This option was introduced in MATLAB R2006b. With MATLAB R2008a, `save` now compresses these MAT-files.

#### Changes to Programming Documentation

Some of the chapters in the MATLAB Programming documentation have been moved or renamed in this release. Also the title of the Programming documentation has been changed to Programming Fundamentals in order to differentiate this part of the MATLAB help from the new documentation on Developing MATLAB Classes.

### Graphics and 3-D Visualization

#### New Figure Toolbar Buttons

Two new toolbar buttons and an information bar have been added in this release that control the new Data Brushing and Data Linking tools. Brushing and linking let you interactively explore and analyze data.

By default, now when you create axes or plot something into a blank figure, an informational banner appears across top of the figure with links to documentation for data brushing and linking capabilities. You can dismiss it by clicking the X button on right-hand side of the message bar. Once you dismiss it, subsequent figures will not display the banner unless you select Show linking and brushing message bar in the MATLAB Preferences Confirmation Dialogs panel.

For more information, see Data Brushing for Graphs and Linked Variables in the Data Analysis release notes and Interactive Data Exploration in the Data Analysis documentation. Also view the video tutorial that describes these and other new features.

#### "v6" Plotting Option Update — Affected Functions

The Version 7.5 (R2007b) release note The "v6" Option for Creating Plot Objects is Obsolete identified plotting functions that accept the `v6` option, which is now obsolete and will be removed in a future version of MATLAB. There is no change to the status of these functions in R2008a. However, the list of affected functions in the R2007b release note had errors and omissions. Below is the correct list of functions that support the option in their syntax and now warn when it is used:

Note that the updated list adds functions `plot3` and `quiver3`.

In the earlier release note, the following functions were incorrectly identified as accepting the `v6` option:

These functions do not call `v6` code and are not affected by it becoming obsolete.

#### Compatibility Considerations

Specifying the `v6` flag to any plotting function now results in a warning that the option is being removed, but the option still functions. To generate a FIG-file for a plot created with the `v6` option, you still need to use the `-v6` option to the `hgsave` command in order to save it in a form that a previous version of MATLAB can read. Figures containing annotations (such as textboxes, arrows, ovals, and rectangles) that are saved this way open in previous versions, but the annotations do not display because different objects are used to contain them in Version 7 than before. That is, the annotation objects have never been backward compatible.

### Creating Graphical User Interfaces (GUIs)

#### New GUI Table Component

The new `uitable` component allows you to show data in a table. This component replaces the undocumented MATLAB `uitable` implementation. If you are using the old `uitable` component, please refer to the uitable Migration Document for help migrating to the supported `uitable` component.

#### Event Data Input to GUIDE Callbacks

Auto-generated callbacks of GUIDE GUIs can now access event data for Handle Graphics callbacks. The following Handle Graphics callbacks provide event data when triggered:

• `KeyPressFcn` in `uicontrol` and `figure`

• `KeyReleaseFcn` in `figure`

• `SelectionChangeFcn` in `uibuttonGroup`

• `WindowKeyPressFcn` in `figure`

• `WindowKeyReleaseFcn` in `figure`

• `WindowScrollWheelFcn` in `figure`

• `CellEditCallback` in `uitable`

• `CellSelectionCallback` in `uitable`

For example, the event data for keypress provides information on the key that is pressed. See the Callback Templates documentation for more information.

#### uigetfile and uiputfile Support of '.', '..', and '/'

Starting in R2007b, the `uigetfile` and `uiputfile` functions interpret `'.'`, `'..'`, and `'/'` the same way as does the `cd` command. `'.'` is interpreted as the current directory, `'..'` is the directory above the current directory, and `'/'` is the top level directory. When specifying a directory rather than a filename for either the `Filterspec` or `DefaultName` argument, you no longer need to end the string with a `'/'`. However, such strings ending with a `'/'` are interpreted as they were in previous releases.

#### hidegui Function Being Obsoleted

The hidegui function is being obsoleted and will be removed in a future version. Instead of this function use the `set ` function to set the figure handle's `handlevisibility` property to `on` or `off`:

`set(figurehandle, ‘handlevisibility', 'on') `

#### Changes to How uicontrols Set Figure SelectionType

`SelectionType` is a figure property that user interface components set when you click them. It is a read-only property that describes the gesture used when clicking the most recently selected object. For single mouse clicks, components no longer set the figure `SelectionType` property to anything but `'normal'` when they are enabled. By default, all components are enabled (their `Enable` property is `'on'`). Previously, enabled components responded to modifier keys (Ctrl, Alt, Shift, and Cmd) by setting `SelectionType` to `'alt'` or `'extend'`. Now all key modifiers set `SelectionType` to `'normal'` for UI components.

Disabled components (those with their `Enable` property set to `'off'`) set `SelectionType` to `'alt'` or `'extend'` in response to modifier keys.

When `Enable` is `'on'`, the control is active and your `Callback` responds to clicks. When `Enable` is `'off'`, the control is not active, and your `ButtonDownFcn` responds to clicks. You can provide components with a `ButtonDownFcn` to detect changes in `SelectionType`.

An additional change affects how list box `uicontrol` components respond to double-clicking. The second of two successive clicks sets the `SelectionType` property of an enabled list box to `'open'`. Other types of uicontrols set their `SelectionType` to `'normal'` after both the first and the second clicks unless key modifiers were used.

The following table describes the click responses for `uicontrol` components.

Enable StatusMouse Button PressedKey Modifier PressedSelectionType
on First Click
SelectionType
on Second Click
`on`left `'normal'`

`'normal'` *

`on`right `'alt'``'open'`
`on`leftCtrl`'normal'`

`'normal'` *

`on`rightCtrl`'alt'``'open'`
`on`leftShift`'normal'`

`'normal'` *

`on`rightShift`'extend'``'open'`
`off`left `'normal'``'open'`
`off`right `'alt'``'open'`
`off`leftCtrl`'alt'``'open'`
`off`rightCtrl`'alt'``'open'`
`off`leftShift`'extend'``'open'`
`off`rightShift`'extend'``'open'`

* Double-click result is `'open'` for list boxes.

For a two-button mouse, pressing the left and right buttons together (without key modifiers) can set `SelectionType` to either `'normal'` or `'extend'`; the results are unpredictable, possibly depending on which button you actually depressed first.

`uipushtool` and `uitoggletool` toolbar buttons do not set `SelectionType` at all, no matter what keys or mouse buttons you press. When they are disabled, `uipushtool` and `uitoggletool` controls do not execute their `ClickedCallback` (or `OnCallback`/`OffCallback`), nor does using them trigger a `WindowButtonDownFcn` callback.

#### Compatibility Considerations

If your callback code depends on the value for `SelectionType`, be aware that for the left mouse button, pressing Ctrl no longer sets it to `'alt'` and that Shift-clicking no longer sets it to `'extend'`.

The `SelectionType` behavior for the right mouse button has not changed.

### External Interfaces/API

#### Interface to Generic DLLs Supported on 64-bit Platforms

The ability to load a generic DLL on 64-bit platforms using `loadlibrary` is available in MATLAB Version 7.6 (R2008a).

#### Compatibility Considerations

You must install a C compiler and Perl to use this feature. For a list of supported compilers and how to install them, see Using loadlibrary on 64-Bit Platforms.

#### Changes to Compiler Support

The set of compilers that MATLAB supports has changed in MATLAB Version 7.6 (R2008a). For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

### New Compiler Support

MATLAB Version 7.6 (R2008a) supports new compilers for building MEX-files.

#### Microsoft Windows (64-bit) platform

• Microsoft Visual Studio 2008

• Windows SDK for Vista

• Intel Visual Fortran 10.1

#### Windows (32-bit) platform

• Microsoft Visual Studio 2008

• Open Watcom Version 1.7

• Intel Visual Fortran 10.1

#### Sun Solaris SPARC (64-bit) platform

• Sun Studio 12 cc / CC Version 5.9

#### Macintosh (Intel-based 32-bit) platforms

• Apple Xcode 3.0 (gcc / g++ Version 4.0.1)

### Discontinued Compiler Support

The following compilers are no longer supported.

#### Windows platforms

• Intel C++ Version 7.1

• Intel Visual Fortran Version 9.0

• Borland® C++Builder® 6 Version 5.6

• Borland C++Builder 5 Version 5.5

• Borland C++ Compiler Version 5.5

• Compaq Visual Fortran Version 6.1

• Compaq Visual Fortran Version 6.6

#### Compatibility Considerations

To ensure continued support for building your C/C++ programs, consider upgrading to another supported compiler. For an up-to-date list of supported compilers, see the Supported and Compatible Compilers Web page.

### Compiler Support to Be Phased Out

The following compilers are supported in Version 7.6 (R2008a), but will not be supported in a future version of MATLAB.

#### Windows (32-bit) platform

• Open Watcom Version 1.3

#### Solaris SPARC (64-bit) platform

• Sun Studio 11 cc / CC Version 5.8

#### New Version of Perl on Windows Platforms

MATLAB Version 7.6 (R2008a) includes Perl on Windows Version 5.8.8.

#### Compatibility Considerations

Prior to this release, MATLAB contained Perl Version 5.005. Consult your Perl documentation for details on the changes between Perl versions.

#### Rebuild MEX-Files Created on Linux Platforms

MATLAB V7.6 (R2008a) on Linux platforms is built with a compiler that utilizes `glibc` Version 2.3.6.

#### Compatibility Considerations

To work with MATLAB V7.6 (R2008a), MEX-files compiled on a Linux platform must be rebuilt.

#### Use mxDestroyArray to Release Memory for mxArray

The documentation for the `mxSetCell`, `mxSetField`, and `mxSetFieldByNumber` functions in the MATLAB C and Fortran API incorrectly instructs customers to use `mxFree` to release memory for any `mxArray` returned by `mxGetCell`, `mxGetField`, or `mxGetFieldByNumber`.

#### Compatibility Considerations

The correct function to use is `mxDestroyArray`. Calling `mxFree` on an `mxArray` only frees the array header, but does not actually free the data itself and can result in a memory leak.

To help diagnose this problem, MATLAB issues a warning if calling `mxFree` on an `mxArray` could cause memory corruption. In future versions of MATLAB, this condition may result in a segmentation violation.

#### Do Not Use get or set Function to Manage Properties of Java Objects

If you want to read or update a property of a Sun Java object created in MATLAB using the Java class constructor, do not use the MATLAB `get` or `set` functions on the property. For example, if you create a Java object called `javaObject` that has a property called `PropertyName`, the following commands may cause memory leaks and will be deprecated in a future version of MATLAB:

```propertyValue = get(javaObject, 'PropertyName'); set(javaObject, 'PropertyName', newValue); ```

#### Compatibility Considerations

The correct commands to use are:

```propertyValue = javaObject.getPropertyName; javaObject.setPropertyName(newValue); ```

In future versions of MATLAB, using `get` or `set` on Java objects to manage the properties will generate an error.

#### New mxArray Functions for Use with MATLAB Class Objects

You can read and modify properties of MATLAB class objects using the `mxGetProperty` and `mxSetProperty` functions.

#### mex.bat File Removed from matlabroot\bin\\$ARCH

Beginning with MATLAB Version 7.3 (R2006b), the Windows script `mex.bat` is located in the directory `matlabroot\bin`. Copies of this file were also in the directory `matlabroot\bin\\$ARCH`. In MATLAB Version 7.6 (R2008a), `mex.bat` is only located in `matlabroot\bin`.

#### Compatibility Considerations

If you did not make the updates described in Location of mex.bat File Changed, you may need to make changes now.

#### Run-time Libraries Required for Applications Built with Microsoft Visual Studio 2008 Compiler

If you distribute a MEX-file, an engine application, or a MAT-file application built with the Visual Studio 2008 compiler, you must provide the Visual C++ run-time libraries. These files are required to run applications developed with Visual C++ on a computer that does not have Visual C++ 2008 installed. For information on locating the Microsoft Visual C++ 2008 Redistributable Package (x86), containing `vcredist_x86.exe` and `vcredist_x64.exe`, consult your Microsoft documentation.

#### Environment Variables Required with Intel Visual Fortran 9.0

When you build a MEX-file, an engine application, or a MAT application using Intel Visual Fortran 9.0, MATLAB requires that you define an environment variable for the Windows platform you are using.

### Windows (32-bit) platform

Define the environment variable `VS71COMNTOOLS`. The value of this environment variable is the path to the `Common7\Tools` directory of the Microsoft Visual Studio .NET 2002 or 2003 installation directory. (Intel Visual Fortran requires Visual Studio .NET 2002 or 2003 on 32-bit Windows platforms.) The Visual Studio .NET 2003 installation program commonly defines this environment variable. For example, you might set the environment variable as follows:

`C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools`

### Windows x64 platform

Define the environment variable `MSSdk`. The value of this environment variable is the path to the installation directory for Microsoft Platform SDK for Windows Server® 2003. (Intel Visual Fortran requires Microsoft Platform SDK for Windows Server 2003 on Windows x64 platforms.) The Microsoft Platform SDK installation program does not commonly define this environment variable. For example, the environment variable might have the value

`C:\Program Files\Microsoft Platform SDK`

#### -largeArrayDims Option to MEX Will Become Default

In a future version of MATLAB, the default `mex` command will change to use the large-array-handling API. This means the `-largeArrayDims` option will be the default. For information about migrating your MEX-files to use the large-array-handling API, see the Technical Support solution `1-5C27B9`.

#### Compatibility Considerations

In the near future you will be required to update your code to utilize the new API. You should review your source MEX-files and `mex` build scripts.

#### Changes to Dynamic Data Exchange (DDE) Documentation

In MATLAB Version 5.1, all development work for the Dynamic Data Exchange (DDE) server and client was stopped. MathWorks provides, instead, a MATLAB interface to COM technology that is documented in Using COM Objects from MATLAB .

### Obsolete Functionality No Longer Documented

Documentation for the following functions no longer included in External Interfaces.

Obsolete Functions

`ddeadv`
`ddeexec`
`ddeinit`
`ddepoke`
`ddereq`
`ddeterm`
`ddeunadv`

The following syntax for `enableservice` no longer included in External Interfaces.

`enableservice('DDEServer',enable)`

#### Compatibility Considerations

If you must support this obsolete functionality, we suggest you print and keep a copy of the relevant MATLAB function reference pages from V7.5 (R2007b) or earlier.

## R2007b

New Features, Bug Fixes, Compatibility Considerations

### Windows Platforms Startup Changes

You can now change the MATLAB startup directory on Microsoft Windows platforms using the standard shortcut Start in field. The ```My Documents\MATLAB``` subfolder (or `Documents\MATLAB` on the Microsoft Windows Vista platform) is the default startup directory. Upon startup, MATLAB automatically creates a ```My Documents\MATLAB``` subfolder (or `Documents\MATLAB` on the Windows Vista platform) if it does not exist, and adds it to the top of the MATLAB search path. To change the startup directory:

1. Right-click the MATLAB shortcut icon and select Properties from the context menu. The MATLAB Properties dialog box opens to the Shortcut pane.

2. In the Start in field, specify the directory in which you want MATLAB to start, for example, ```C:\My MATLAB Place```.

You can specify the directory via a UNC path (that is, the path can begin with `\\`).

The Target field specifies the full path to the file to start MATLAB, `matlab.exe`, located in the `bin` folder (for example, ```C:\Program Files\MATLAB\R2007b\bin\matlab.exe```). Use the `bin\matlab.exe` to start MATLAB instead of `matlab.bat` or `matlab.exe` located in a platform directory such as `bin\win32`. The `bin\matlab.exe` detects the Windows platform and ensures required run-time files are installed.

#### Compatibility Considerations

The Target field no longer contains the ```-sd \$documents``` startup option. In MATLAB Version 7.4 (R2007a), the startup directory was specified via the `-sd` startup option in the Target field. You had to specify the directory via a mapped drive. Any value in the Start in field was ignored.

The file to start MATLAB, as specified in the Target field, was `matlab.bat`.

Change any scripts you use to start MATLAB to specify the full path to `bin\matlab.exe`. If you use `matlab.bat` in R2007b, MATLAB issues a warning message instructing you to use `matlab.exe` instead.

If scripts include the `-sd` startup option to specify the startup directory, that will be the startup directory, even if a directory is specified in the Start in field.

#### Desktop

New features and changes introduced in Version 7.5 (R2007b) are:

### Minimizing Tools in the Desktop Now Supported on Macintosh Platforms

You can now minimize tools in the desktop on Apple Macintosh platforms. It was introduced for other platforms in a previous version.

### Double-Click to Maximize or Restore Minimized Tools in Desktop

After you minimize a tool within the desktop, you can now:

• Restore the tool to its former position by double-clicking the button.

• Drag a button to move its position—drag it to another edge of the desktop or to a new position within the edge where it's currently located.

• Restore the tool by dragging the button to a location within the desktop, or outside the desktop to undock the tool.

Similarly, you can double-click a tool's title bar to maximize the tool in the desktop; then double-click the title bar again to restore it to its former position. (The capability was introduced in R2007a, MATLAB Version 7.4).

### New Desktop Layout — All but Command Window Minimized

Select Desktop > Desktop Layout > All but Command Window Minimized to arrange the desktop as shown here. The Command Window is open in the desktop, and all other desktop tools are open, but minimized.

### Start Button Now Includes New Category for Links and Targets

In the Start button, there is a new category for Link and Target products. Select Start > Links and Targets, and then select one of the products. In previous versions, you accessed these products from the Toolboxes or Simulink software categories.

You also use this new category when running demos, or accessing Demos or Contents in the Help browser. For more information, see Demos and Help Browser Contents Now Include New Category for Links and Targets.

### Start Button — View Source Files Renamed

To add your own toolboxes to the Start button, select Start > Desktop Tools > View Start Button Configuration Files. In previous versions, this menu item was View Source Files. There has been no change in functionality or features.

### Changes to Look of Buttons in Desktop and Other Tools

Some icons on toolbar buttons have changed slightly. In addition, standard desktop icon image files are no longer provided in the `matlabroot/toolbox/matlab/icons` directory.

#### Compatibility Considerations

If your code relied on icon files in the `matlabroot/toolbox/matlab/icons` directory (for example, for adding your entries to the Start button or the Help browser), you might need to use other image files.

### Antialiasing Option No Longer Necessary on Windows and Macintosh Platforms

MATLAB now follows the operating system's font settings on Microsoft and Macintosh platforms. This provides smooth fonts without the need for antialiasing within MATLAB.

#### Running Functions — Command Window and History

New features and changes introduced in Version 7.5 (R2007b) are:

### Command History — Find Entry by Letter Now Looks in Collapsed Sessions

When you type letters in the Command History, it finds and selects the next entry that begins with the letters you typed. Now, if the entry is in a session that was collapsed, MATLAB automatically expands the session and selects the matching entry in it. In previous versions, MATLAB did not find matching entries in collapsed sessions.

If you do not want to find entries in collapsed sessions (the previous behavior), you can instead select Edit > Find, which finds text in the Command History, but not in collapsed sessions. For more information, see Quick Search for Entries Beginning with Specified Letters or Numbers.

### Pop-Up Help for a Function in the Command Window

For more information, see Help on Selection Enhanced in Command Window and Editor.

#### Help

New features and changes introduced in Version 7.5 (R2007b) are:

### Minor Visual Changes to Help Browser

• To open the Help browser from a tool's Help menu, select Product Help. In previous versions you selected Full Product Family Help.

• When the Help browser first opens, it displays help for MATLAB. In previous versions, it displayed a Begin Here page. The information previously available on the Begin Here page has been incorporated into the MATLAB roadmap page.

• When you close and reopen the Help browser, it maintains the list of pages you previously viewed, but does not open to the page you last viewed. In previous versions, upon reopening, the Help browser displayed the page you last viewed.

### Demos and Help Browser Contents Now Include New Category for Links and Targets

When you run the `demo` function or access Demos or Contents in the Help browser, there is a new category for Link and Target products.

To use the `demo` function to access a demo that is now in the Links and Targets category, you specify the new subtopic 'links and targets', followed by the category. For example

`demo('links and targets', 'link for modelsim')`
displays the Demos pane, and expands the Link for ModelSim® demos listing.

In the Help Demos, Link and Target products appear together in their own category, and are identifiable by the new Links and Targets icon, .

In the Help Contents, Link and Target products appear together after any installed Simulink and blockset products, and are identifiable by the new Links and Targets green book icon, .

This new category is also used in the Start button in the MATLAB desktop—for more information, see Start Button Now Includes New Category for Links and Targets.

If you add help or demos to the Help browser for your own toolbox or list your own toolbox in the Start button and you want to take advantage of the new Links and Targets category, use the new type, `links_targets`, in the `info.xml` file for your toolbox.

#### Compatibility Considerations

In previous versions, when you used the `demo` function to access a demo that is now in the Links and Targets category, you specified a different subtopic and category. If you have any code that relies on the `demo` function for accessing Links and Targets demos, you will need to replace the subtopic and category in the code.

In previous versions, you accessed the products in the Help browser Demos from the Toolbox or Simulink software categories.

In previous versions, you accessed the products in the Help browser Contents from within the list of toolbox products (orange book icon) or Simulink products (blue book icon).

### Help on Selection Enhanced in Command Window and Editor

To get help for a function in the Command Window or the Editor, click the pointer in the function name and press F1. The reference page for that function appears in a small help window. To close the window, press Escape. You can also access the feature by choosing Help on Selection from the context menu. To change the window in which this help appears, select File > Preferences > Help, and adjust the option for Help on Selection and More Help.

#### Compatibility Considerations

In the previous version, you could select the function name, right-click, and select Help on Selection. The documentation appeared in the Help browser. Now if you want to see the documentation for the function in the Help browser, first access the pop-up help, and then click the Open Help Browser link.

#### Editing and Debugging M-Files

New features and changes introduced in Version 7.5 (R2007b) are:

### Run Your Function M-Files in the Editor/Debugger Using Configurations

In the Editor/Debugger, you can provide values for a function's input arguments using a configuration, and then run that configuration to use the assigned values. Use a configuration as an alternative to running the function in the Command Window. You can associate multiple configurations with an M-file, each for different input values. MATLAB saves the configurations between sessions.

To create a configuration, first open an M-file in the Editor/Debugger. Then, from the down arrow on the Run button in the toolbar select Edit Configurations for `filename`. In the resulting Edit M-File Configurations dialog box, add statements and name the configuration. For more information, see Run Files with Input Arguments in the Editor.

### Run/Continue Button Changes

The Run/Continue button has a new look and new location on the Editor/Debugger toolbar.

#### Compatibility Considerations

The button performs the same as it did in previous versions, but you need to access it in the new position.

### Code Folding Feature for Collapsing and Expanding Code

To improve the readability of files containing several subfunctions, the Editor includes a code folding feature, which is enabled by default. Using this feature you can collapse and expand subfunctions and their associated help. The following figure shows the `collatzplot_new` function collapsed, such that only the function definition is displayed. The figure shows the `collatz` function expanded, revealing both the help code and the function code. If you collapse just the help code, only the H1 help line displays.

• To expand code that is collapsed, click the plus sign (+) to the left of the code you want to expand.

• To collapse code that is expanded, click the minus sign (-) to the left of the code you want to collapse.

• To expand or collapse all of the code in an M-file, place your cursor anywhere within the M-file, right-click, and then select Code Folding > Expand All or Code Folding > Collapse All from the context menu.

### Quick Help for a Function in the Editor

For more information, see Help on Selection Enhanced in Command Window and Editor.

### Line Endings Removed in Files Provided with MATLAB Software for Windows Platforms; Impacts Viewing in Notepad Application

In previous versions, text files provided with MATLAB for Windows platforms included a carriage return and line feed at the end of each line. Starting in R2007b, the text files MATLAB provides do not include a carriage return and line feed at the end of each line.

File types affected are:

• `.asc`

• `.bat`

• `.c`

• `.cc`

• `.cdr`

• `.cpp`

• `.def`

• `.for`

• `gs.rights`

• `.h`

• `.ini`

• `.m`

• `.mdl`

• `.pl`

• `readme`

• `.tlc`

• `.tmf`

• `.txt`

There is no impact if you view the files in MATLAB and other common text editors, with the known exception of the Microsoft Notepad application.

#### Compatibility Considerations

If you use the Notepad application to view files provided with MATLAB, you see carriage return and line feed symbols instead of line endings. This makes the files less readable in the Notepad application. Other text editors might display the symbols instead of line endings, but of the common text editors tested, none have been found that do so.

As an alternative to the Notepad application, use the Microsoft WordPad application, provided with Windows platforms, or another text editor to view the files.

If your Windows file associations are set to associate any of the listed file types with Notepad, change the associations to use WordPad or another text editor.

The following illustration shows how the `ver` M-file included with MATLAB Version 7.5 looks when opened in the Notepad application.

The following illustration shows how the `ver` M-file included with MATLAB Version 7.5 looks when opened in the WordPad application.

There are no problems with files you create or edit in the Notepad application, and then view or edit in MATLAB. The files have line endings in the MATLAB Editor, and continue to have line endings when you open them in the Notepad application.

(Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.)

### Stand-Alone Editor Will Not Be Included in Next Version

The MATLAB stand-alone Editor (`meditor.exe`) will no longer be provided, starting in the next version of MATLAB. Instead of the stand-alone Editor, you can use the MATLAB Editor/Debugger. It provides all the features of the stand-alone Editor, plus the following:

• Tab completion

• Debugging M-files

• Evaluating selections

• Accessing source control features

• Docking the tool in the MATLAB desktop

• Using cell features for rapid code iteration or publishing

#### Compatibility Considerations

Some users have preferred the stand-alone Editor to the MATLAB Editor/Debugger because of slightly better startup performance and because it does not require a MATLAB license. For those situations, you can use any text editor you have, such as the UltraEdit® application from IDM Computer Solutions, or the GNU Emacs software.

### Determine the McCabe (Cyclomatic) Complexity of an M-File

The `cyc` option to the mlint function enables you to determine the McCabe complexity (also referred to as the cyclomatic complexity) of an M-file. Higher McCabe complexity values indicate higher complexity, and there is some evidence to suggest that programs with higher complexity values are more likely to contain errors. Frequently, you can lower the complexity of a function by dividing it into smaller, simpler functions. In general, smaller complexity values indicate programs that are easier to understand and modify. Some people advocate splitting up programs that have a complexity rating over 10. See `mlint` for syntax and an example.

#### Publishing Results

New features and changes introduced in Version 7.5 (R2007b) are:

### Notebook and Word for Office 2007

Notebook now supports Microsoft Word for Office 2007. For details, see Creating a MATLAB Notebook to Publish to Microsoft Word.

### Text Markup in Cells for Publishing

The following Editor/Debugger menu items are added to assist you in marking up cells in the Editor/Debugger for publishing. Access the menu items presented in the following list from Cell > Insert Text Markup . When you select the menu item, the Editor inserts code to assist you in adding the text markup for the specified item.

• Document Title and Introduction

• Section Title with Cell Break

• Image

• Numbered List

• HTML Markup

• LaTeX Markup

The first two list items are provided instead of the Cell Title and Descriptive Text menu items that were offered in Version 7.4 (R2007a).

As an alternative to using the Cell menu items, you can manually insert code to mark up cells in your M-file for publishing. For details on the Cell menu items and the resulting code see Marking Up Text in Cells for Publishing

### Preference to Restrict Lines of Output

You can now specify options to restrict the number of lines included in the output of a published M-file. To access this option from the Editor/Debugger, follow these steps:

1. Select File > Preferences > Editor/Debugger > Publishing

2. In the Editor/Debugger Publishing Preferences pane, select the Evaluate code and Restrict output to options.

3. Specify the maximum number of lines that you want to include in the output.

### Mathematics

#### New Functions

FunctionDescription
`quadgk`

`bvp5c`

Solves boundary value problems for ordinary differential equations, notably useful for small error tolerances

`maxNumCompThreads`

Gets and sets the maximum number of computational threads

#### finite Function Deprecated

In this release, the `finite` function displays a warning message that the function is now deprecated. Support for `finite` will be removed in a future release of MATLAB software.

#### Compatibility Considerations

It is recommended that you replace all calls to `finite` with the `isfinite` function.

#### dmperm Function Gives Coarse Decomposition

The `dmperm` function now provides two additional output arguments for the indices of the Dulmage-Mendelsohn coarse decomposition.

#### ldl Function Supports Real Sparse Symmetric Matrices

The `ldl` function now provides factorization and solving for an additional output argument, the scaling matrix, when the input matrix is real sparse and symmetric.

MATLAB software now uses Version 3.1 of the Linear Algebra Package (LAPACK) library.

For AMD processors, MATLAB software now uses Version 3.6 of the AMD Core Math Library (ACML™) for the Basic Linear Algebra Subroutine (BLAS) libraries.

#### Library for LAPACK and BLAS Symbols Separated

The binder library, `libmwlapack.lib`, containing both LAPACK and BLAS symbols is now two separate library files: `libmwlapack.lib` for LAPACK symbols and `libmwblas.lib` for BLAS symbols.

#### Compatibility Considerations

If you previously linked to the `libmwlapack.lib` library to use the BLAS symbols, you will need to update your code to link to the `libmwblas.lib` library.

#### Colon Operations on Characters Return Character Type Data

Using a colon with characters to iterate a for-loop now returns data of type character. For example,

```for x='a':'b',x,end ```
results in
```x = a x = b ```

#### Compatibility Considerations

Previously, colon operations with characters iterating a for-loop returned data of type double. In previous releases the above example returned:

```for x='a':'b',x,end x = 97 x = 98 ```
Existing program code that relies on the colon operations of character arrays returning a double, needs to be updated to expect a character data type.

#### Matrix Generating Functions No Longer Accept Complex Inputs

Calling matrix generating functions, such as `ones`, `zeros`, `rand`, `randn`, `true`, and `false`, with a complex number as dimensions input now returns the error:

```true([1 i]) ??? Error using ==> true Size vector must be a row vector with real elements.```

#### Compatibility Considerations

In previous releases, if you supplied a complex number as a dimension input, MATLAB software returned:

```true([1 i]) Warning: Size vector should be a row vector with integer elements. Complex inputs will cause an error in a future release. ans = Empty matrix: 1-by-0```
Existing program code that relies on entering complex numbers as dimension input to a matrix generating function should be modified.

### Programming

#### Increased Size for Large Arrays

On 64-bit platforms, MATLAB arrays are no longer limited to 231 elements. The limit in MATLAB 7.5 is 248-1. For example, given sufficient memory, many numeric and low-level file I/O functions now support real double arrays greater than 16 GB.

#### Documentation for Multiprocessing in MATLAB

Documentation for "Multiprocessing in MATLAB" has moved from Desktop Tools and Development Environment to the "Improving Performance and Memory Usage" section of MATLAB Programming.

#### Setting Number of Threads Programmatically

In this release, MATLAB provides a way to set or retrieve the maximum number of computational threads from within an M-file program. With the `maxNumCompThreads` function, you can either set the maximum number of computational threads to a specific number, or indicate that you want the setting to be done automatically by MATLAB

#### New Internal Format for P-code

P-code files have a new internal format in MATLAB Version 7.5. The new P-code files are smaller and more secure than those built with MATLAB 7.4 and earlier, and provide a more robust solution to protect your intellectual property.

Any P-code files that were built using MATLAB 7.4 or earlier also work in 7.5. However, support for these older files will at some point be removed from MATLAB.

P-code files built with MATLAB 7.5 only work on 7.5 or later. They cannot be used with MATLAB 7.4 or earlier versions.

#### Compatibility Considerations

Rebuild any P-code files using MATLAB 7.5 that you expect to need in the future.

#### New Split String Functionality in regexp

Using the regular expressions function `regexp`, you can now split an input string into sections by specifying the new `'split'` option when calling `regexp`:

```s1 = ['Use REGEXP to split ^this string into ' ... 'several ^individual pieces']; s2 = regexp(s1, '\^', 'split'); s2(:) ans = 'Use REGEXP to split ' 'this string into several ' 'individual pieces' ```

The `split` option returns those parts of the input string that are delimited by those substrings returned when using the `regexp` `'match'` option.

### New Error Handling Mechanism

MATLAB extends its error-handling capabilities with the new `MException` class to provide you with a more secure and extensible system for throwing and responding to errors. Read about this new feature in the Error Handling section of the MATLAB Programming documentation and in related function reference pages such as `MException`.

This feature extends the error-handling capabilities available in earlier releases, but does not replace that functionality. Your M-file programs will continue to function the same when using Version 7.5.

### New Syntax for catch Function

As part of new error-handling mechanism, the `catch` function has a new, optional syntax as shown here in a try-catch statement:

```try % Try to execute this block of code. Go to 'catch' on error - code that may error - catch ME % Deal with the error captured in MException object, ME - code to handle the error - end```

`ME` is an object of the `MException` class. This command gives you access to the `MException` object that represents the error (i.e., exception) being caught.

### Warning and Error Messages Now Wrap

In previous versions of MATLAB, warning and error messages that were longer than the width of your terminal screen extended beyond the visible portion of your screen. These messages now wrap onto succeeding lines so that the entire text of the warning or error is visible.

### Change to Error Message from Anonymous Function

The error message and M-file line number that MATLAB displays when encountering an error in an anonymous function defined within a script file or at the MATLAB Command Line has changed in this release. In MATLAB Version 7.4, the error message included the line number (set to `1` for anonymous functions), and the stack information returned by the `lasterror` function also showed the line number as `1`. In MATLAB 7.5, the line number is not displayed in the error message and is set to `0` in the returned stack information.

For example, when you enter the following two lines at the command line, MATLAB generates an error from the anonymous function:

```X = @() error('* Error *'); X()```

This example shows the difference between MATLAB Versions 7.4 and 7.5:

```e = lasterror; e.message ans = Error using ==> @()error('Error') at 1 % V7.4 response Error using ==> @()error('Error') % V7.5 response * Error * e.stack ans = file: '' name: '@()error('* Error *')' line: 1 % V7.4 response line: 0 % V7.5 response```

#### Compatibility Considerations

If you have programs that rely on the line number returned in response to an error in an anonymous function, these programs may not work as expected. Remove dependencies on the returned error message and line number, or update your program code to use the new string and value.

### New Message In Response to Ctrl+C

MATLAB now displays a more user-friendly message when you press Ctrl+C. The previous response to Ctrl+C was

```Error in ==> testctrlc>waitawhile at 5 pause(100); Error in ==> testctrlc at 2 waitawhile ```

In this and future releases, pressing Ctrl+C still halts program execution, but now displays the response

```??? Operation terminated by user during ==> testctrlc> waitawhile at 5 In ==> testctrlc at 2 waitawhile ```

#### Compatibility Considerations

You only need to be aware that the change in the text of this message is intentional and does not signify any error on your part.

In previous releases, `hdfread` issued a warning when a requested I/O operation failed. In addition, `hdfread` created an empty variable in the workspace. In this release, `hdfread` now errors when a requested I/O operation fails and does not create an empty variable in the workspace.

#### Compatibility Considerations

If you call `hdfread` in a script to perform an I/O operation and that operation fails, your script will now terminate. Previously, because `hdfread` only warned when an I/O operation failed, your script would continue processing.

#### Results From tempname Are More Unique

The `tempname` function now produces a string such as

`C:\Temp\tpe51f2ba3_9ad3_490f_8142_58359c98f4a5`

when Java is present, or a string like

`C:\Temp\tp346976948758473`

when `nojvm` is selected. Underscores are included in the name so you can use the filename portion of it as a valid M-function name. If a string row vector is passed in as an argument, that string is used instead of `tempdir` as the root.

#### Compatibility Considerations

Because the new string generated by `tempname` is generally longer than the string constructed in earlier versions, there is a possibility of exceeding length restrictions, especially if your program code passes a string to the `tempname` function. If you consider this to be a potential problem, verify that the strings you pass to `tempname` will not result in an overly long string being returned.

#### MATLAB Includes New Input Argument Validation Functions

MATLAB now includes two new functions that validate the input arguments passed to functions. For example, you can use these functions to make sure that an input argument is numeric and nonempty. The following table lists these functions with a brief description.

FunctionDescription
`validateattributes`Check validity of array
`validatestring`Check validity of text string

#### Windows Current Working Directory Corrected

On Windows, you can define a current working directory, `cwd`, for each drive letter. For example, entering the command ```cd D:\work``` at the DOS prompt defines your `D` current working directory as `D:\work`. All references to `D:` are then relative to this directory.

The term . . .Represents the directory . . .
`D:``D:\work`
`D:matlab``D:\work\matlab`
`D:\matlab``D:\matlab`

(Note the difference between `D:\` and `D:`, where the former is the drive `D`, and the latter is a user-defined working directory that may or may not be equal to `D:\`.)

Previous versions of MATLAB have been inconsistent in the way that volume-relative path specification is handled. For example, in MATLAB 7.4 and earlier, if `D:` were defined as the directory `D:\work`, the following commands on the left and right returned identical results:

```dir D: dir D:\ dir D:matlab dir D:\work\matlab fileparts('D:myfile.m') fileparts('D:\myfile.m')```

This has been fixed in MATLAB 7.5 so that the following are now equivalent:

```dir D: dir D:\work dir D:matlab dir D:\work\matlab fileparts('D:myfile.m') fileparts('D:\work\myfile.m')```

#### Compatibility Considerations

Some MATLAB commands may fail or return unexpected results if you use Windows current working directories on MATLAB. You might have to update hard-coded paths if you have been relying on the incorrect behavior exhibited in earlier versions.

#### New Multimedia Functionality

A new `mmreader` video file reader object for Windows platforms supports formats such as AVI, MPEG, and WMV, and adds the ability to read additional video codecs that `aviread` does not support. For more information, see the `mmreader` and `read` reference pages.

#### Compressed AVI Video Files in Windows Vista and Windows XP x64

Because Windows Vista, Windows Vista 64-bit, and Windows XP x64 operating systems do not ship with the Indeo® 5 codec, which is the default codec used by MATLAB Audio-Video functions for file compression, the functions `movie2avi` and `avifile` now generate uncompressed AVI files on these platforms. Also, `aviread` on these platforms cannot read files that were compressed using the Indeo 5 codec.

#### Compatibility Considerations

If you have upgraded your Windows operating system to Windows Vista, Windows Vista 64-bit, or Windows XP x64, you need to install the Indeo 5 codec to read or create Indeo 5 compressed AVI files with `aviread`, `avifile`, or `movie2avi`. You can learn more about downloading the Indeo 5 codec from the Ligos Corporation Web site at `http://ligos.com/index.php/home/products/indeo/`

#### mmfileinfo Reads Files on MATLAB Path

The `mmfileinfo` function now reads files on the MATLAB path, not only those in the current directory. The `mmfileinfo` output struct contains a field called `Path`, which indicates the directory where the file exists.

#### Compatibility Considerations

The `Filename` field of the output struct from `mmfileinfo` now contains only the filename itself without any path information, while the path information is contained in the `Path` field. In previous releases, the `Filename` field contained both path and filename information.

#### Changes to imread Support of TIFF Format

The `imread` function includes several updates to its TIFF support:

• `imread` reads TIFF files that use JPEG, LZW, and Deflate compression.

• `imread` reads image data from TIFF files in any arbitrary samples-per-pixel and bits-per-sample combination.

• `imread` provides increased performance when reading large images, when used with the 'PixelRegion' parameter.

#### Removal of freeserial Function

The `freeserial` function is now obsolete. Use `fclose` to release the serial port.

#### Compatibility Considerations

If your program code still makes use of the `freeserial` function, replace each instance with the `fclose` function instead.

### Graphics and 3-D Visualization

#### Datatips Are Now Saved to FIG-Files

When you save a figure, all datatips existing in it are saved along with other annotations. When you open the FIG-file, the datatips are displayed and can be manipulated or deleted in the same ways they could in the original figure.

#### Compatibility Considerations

If you open a FIG-file containing datatips while using a previous MATLAB version (V7.4 or earlier), no error results, but the datatips do not display.

#### New Options for Displaying Groups of Lines in Legends

You can now customize how legends for figures display groups of lines, such as contours. Previously, legends displayed groups of lines such as contourgroups with a glyph that represented the entire group; now users have the flexibility to designate a single legend entry, a legend entry for each child of the group, or no legend entries for the group.

By default, a legend entry for an hggroup now consists of the `DisplayName` of its first child and a glyph representing it (previously, no glyph appeared, only the `DisplayName`). This is what you now see after clicking the legend tool icon in the figure's toolbar. However, you can set the new `Annotation` property of hggroups to control how the group is represented in a legend. For details and examples of its use in customizing legends, see Controlling Legends in the Graphics documentation.

#### Drawnow Update Option Now Updates Uicontrols Only

The `drawnow` command can now selectively update the display of UI components. The `update` option enables you to update only uicontrol objects without allowing callbacks to execute or processing other events in the queue.

#### Annotation Textboxes Can Automatically Resize to Fit their Contents

In previous releases, textboxes had fixed sizes that users needed to adjust to fit the size of their contents. Now, if you create a textbox annotation using a GUI or the `annotation` function, it can grow or shrink to just fit the text you type into it. This behavior is controlled by the Annotation Textbox object's `FitBoxToText` property, which can be `'on'` or `'off'`. When you create a textbox with the Annotation toolbar (using the tool), this property is set to `'on'` if you create a textbox without dragging; however, if you drag to make the new textbox have a certain size, the property is initially `'off'`. When you create a textbox with the annotation function, for example,

`htb = annotation('textbox')`
without specifying a position and size, the textbox is created with `FitBoxToText` set to `'on'`. If you specify a position vector in the command, for example,
`htb = annotation('textbox', [.1 .8 .4 .1])`
the textbox is created with `FitBoxToText` set to `'off'`.

Similarly, if you resize a textbox in plot edit mode or change the width or height of its `position` property directly, its `FitBoxToText` property is set to `'off'`. You can toggle this property with `set`, with the Property Inspector, or more conveniently, via the object's context menu, as the illustration below shows.

If you edit a tex