| Contents | Index |
New features and changes introduced in this version are
MATLAB support for Windows XP 64-bit edition enables you to handle much larger data sets. To learn more about memory allocation for arrays, see Memory Allocation.
Note You must change the compression setting if you use the avifile or movie2avi function on Windows XP 64. |
MATLAB currently defaults to using Indeo codecs to compress video frames when using avifile/addframe or movie2avi. If you attempt to use avifile and addframe, or movie2avi on a Windows XP 64-bit platform without specifying the compression type, an error message appears indicating the codec was not found. Nondefault settings must be explicitly passed in when using these functions on Windows XP 64 because Microsoft does not provide Indeo codecs on this platform.
This issue does not affect 32-bit Windows XP installations.
To work around this issue, do the following:
Explicitly specify no compression when creating the avifile object or when calling movie2avi. Two examples of this are
aviobj = avifile('myvideo.avi', 'compression', 'none');
movie2avi(mov, 'myvideo.avi', 'compression', 'none');
Specify a codec for a compression that is installed. The ones that are included with Windows XP 64 are
IYUV — Intel YUV codec (c:\winnt\system32\iyuv_32.dll)
MRLE — Microsoft RLE codec (c:\winnt\system32\msrle32.dll)
MSVC — Microsoft Video 1 codec (c:\winnt\system32\msvidc32.dll)
For example, to use the Intel YUV codec, use the four-CC code:
aviobj = avifile('myvideo.avi', 'compression', 'IYUV');Other codecs can be found at http://fourcc.org.
Note there are restrictions with some codecs. For example, some codecs can only be used with grayscale images.
MATLAB 7.2 introduces the following new features for regular expressions in MATLAB. For more information on these features, see Regular Expressions in the MATLAB Programming documentation.
Dynamic regular expressions — You can now insert MATLAB expressions or commands into regular expressions or replacement strings. The dynamic part of the expression is then evaluated at runtime.
Generating literals in expressions — Use the new regexptranslate function when you want any of the MATLAB regular expression functions to interpret a string containing metacharacters or wildcard characters literally.
New parsing modes — Four matching modes (case-sensitive, single-line, multiline, and freespacing) extend the parsing capabilities of the MATLAB regular expression functions.
Warnings display — Use the new 'warnings' option with the regular expression functions to enable the display of warnings that are otherwise hidden.
Calling regexp or regexpi with the 'tokenExtents' and 'once' options specified now returns a double array instead of a cell array. You may need to change your code to accommodate the new return type.
Use the new setenv function to set the value of an environment variable belonging to the underlying operating system.
You can now use the issorted function on a cell array of strings.
xlsread now supports Excel files having formats other than XLS (e.g., HTML) as long as the COM server is available. Also, xlsfinfo now returns this file format information.
Files specified as arguments to gzip, gunzip, tar, and zip can now be specified as partial path names. On UNIX machines, directories can start with ~/ or ~username/, which expands to the current user's home directory or the specified user's home directory, respectively. The wildcard character * can be used when specifying files or directories, except when relying on the MATLAB path to resolve a filename or partial pathname.
E-mail messages that you send using sendmail are no longer restricted to ASCII character encoding schemes.
Due to a bug introduced in MATLAB R14, the str2func function failed to issue a warning or error when called with an invalid function name or a function name that includes a path specification. In the R2006a release, str2func now generates a warning under these conditions. In a future version of MATLAB, str2func will generate an error under these conditions.
Any existing code that calls str2func with an invalid function name or a function name that includes the path now generates a warning message from MATLAB. In a future version, this will cause an error. You should note any such warnings when using R2006a, and fix the input strings to str2func so that they specify a valid function name.
The fopen function has a new optional argument, a string that specifies a name or alias for the character encoding scheme associated with the file. If this argument is omitted or is the empty string (''), the MATLAB default encoding scheme is used. Given a file identifier as the only argument, fopen now returns an additional output value, a string that identifies the character encoding scheme associated with the file.
Low-level file I/O functions that read data from files, including fread, fscanf, fgetl, and fgets, read characters using the encoding scheme associated with the file during the call to fopen. Low-level file I/O functions that write data, including fwrite and fprintf, write characters using the encoding scheme associated with the file during the call to fopen.
Support for character encoding schemes has these limitations:
Surrogate pairs are not supported. Each surrogate pair is read as a replacement character, the equivalent of char(26).
Stateful character encoding schemes are not supported.
Byte order marks are not interpreted in any special way. Your code must skip them if necessary.
Scanning numbers, using fscanf, is supported only for character encoding schemes that are supersets of ASCII. (Most popular character encoding schemes, with the exception of UTF-16, are such supersets.)
In V7.1 (R14SP3), low-level file I/O functions that read and write data treated characters as unsigned bytes. Programs using such functions as fread may have called native2unicode to convert input to MATLAB characters using a particular encoding scheme. Programs using such functions as fwrite may have called unicode2native to convert output from MATLAB characters using a particular encoding scheme.
For example, on a Japanese Windows platform, where the default character encoding scheme is Shift-JIS, a program may have used native2unicode and unicode2native to read and write Japanese text in this way:
fid = fopen(file); data = fread(fid, '*char')'; fclose(fid); dataU = native2unicode(data); % operate on data outData = unicode2native(dataU); fid = fopen(file, 'w'); fwrite(fid, outData, 'char'); fclose(fid);
Such a program would produce different and possibly incorrect results in V7.2 (R2006a). The calls to native2unicode and unicode2native are no longer necessary, because the fread and fwrite functions now convert data to and from MATLAB characters using the character encoding scheme specified in the calls to fopen. In V7.2 (R2006a), the example code can be simplified to produce correct results:
fid = fopen(file); dataU = fread(fid, '*char')'; fclose(fid); % operate on data fid = fopen(file, 'w'); fwrite(fid, dataU, 'char'); fclose(fid);
Changes to code using fread, fgets, fgetl, and fscanf. If your code calls native2unicode to convert input to MATLAB characters using a specified (or default) encoding scheme, you can, but do not have to, remove the calls to native2unicode.
This applies to reading from an encoded file using any of the following:
fread with precision set to '*char' or 'char=>char'
fgets or fgetl
fscanf with the format specifier set to either '%s' or '%c'
When you remove a call to native2unicode, be sure that the call to fopen supplies the same encoding argument (if any) as the call to native2unicode.
You may have used code like these examples in V7.1 (R14SP3):
indata = native2unicode(fread(fid, '*char')'); indata = native2unicode(fread(fid, 'char=>char')'); indata = native2unicode(fgets(fid)); indata = native2unicode(fgetl(fid)); indata = native2unicode(fscanf(fid, '%s')); indata = native2unicode(fscanf(fid, '%c'));
You can, but do not have to, remove the calls to native2unicode in V7.2 (R2006a):
indata = fread(fid, '*char')'; indata = fread(fid, 'char=>char')'; indata = fgets(fid); indata = fgetl(fid); indata = fscanf(fid, '%s'); indata = fscanf(fid, '%c');
Changes to code using fwrite. If your code calls unicode2native to convert output from MATLAB characters using a specified (or default) encoding scheme, in most cases you must remove the calls to unicode2native. This is especially important if the encoding represents multibyte characters.
This applies to writing an encoded file using fwrite with precision set to either 'char' or 'char*1'.
When you remove a call to unicode2native, be sure that the call to fopen supplies the same encoding argument (if any) as the call to unicode2native.
You may have used code like these examples in V7.1 (R14SP3):
fwrite(fid, unicode2native(outbuff), 'char'); fwrite(fid, unicode2native(outbuff), 'char*1');
You must remove the calls to unicode2native in V7.2 (R2006a):
fwrite(fid, outbuff, 'char'); fwrite(fid, outbuff, 'char*1');
![]() | Data Analysis, MATLAB Version 7.2 (R2006a) | Graphics and 3-D Visualization, MATLAB Version 7.2 (R2006a) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |