User`s guide

Programming
15-23
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.