MATLAB Release Notes    

Programming and Data Types Features

Partial Evaluation of Expressions

Within the context of an if or while expression, MATLAB does not necessarily evaluate all parts of a logical expression. In some cases, it is possible, and often advantageous, to determine whether an expression is true or false through only partial evaluation. This is sometimes referred to as short-circuiting.

For example, if A equals zero in statement 1 below, then the expression evaluates to false, regardless of the value of B. In this case, there is no need to evaluate B and MATLAB does not do so. In statement 2, if A is nonzero, then the expression is true, regardless of B. Again, MATLAB does not evaluate the latter part of the expression.

You can use this property to your advantage to cause MATLAB to evaluate a part of an expression only if a preceding part evaluates to the desired state.

New MATLAB Search String Function

strfind is a new character array function in MATLAB. It searches for all occurrences of a string pattern within another, longer string. Placement of the two string arguments in the argument list requires that you be specific about which string is the character pattern to search for and which is the string in which to search. This allows you more control over how the search is performed compared with the MATLAB findstr function, particularly when executing searches within a loop.

New File I/O Functions for Scientific Data Formats

There are six new MATLAB 6.1 functions that enable you to retrieve information and data from Common Data Format (CDF), Flexible Image Transport System (FITS), and Hierarchical Data Format (HDF) files.

Function
Purpose
cdfinfo
Return information about a CDF file
cdfread
Read data from a CDF file
fitsinfo
Return information about a FITS file
fitsread
Read data from a CDF file
hdfinfo
Return information about an HDF or HDF-EOS file
hdfread
Read data from an HDF or HDF-EOS file

New Audio Functions

MATLAB 6.1 includes two new audio functions for 32-bit Windows platforms only.

Function
Purpose
audioplayer
Create an audio object to play audio data
audiorecorder
Create an audio object to record audio data

Date Conversion Changes

The datenum and datestr functions can now accept a date vector, as defined by datevec, as an input argument. For example, datestr(clock) returns the current date and time as string such as 27-Apr-2001 15:58:41.


  Mathematics Features Graphics Features