Why do I obtain different results when using the IMPORTDATA function in MATLAB 7.0 (R14) than I did with MATLAB 6.5 (R13)?

When I call the IMPORTDATA function on an XLS-file in MATLAB 6.5 (R13), the return type is a structure with 2 fields: one is a matrix of doubles (data) and the other is a cell array (text_data).
When I call the same function with the same argument in MATLAB 7.0 (R14), the return type is a structure with two fields, both of which are structures containing a single field each called Sheet1. These fields contain data and text_data as described above.

 Accepted Answer

This is an expected behavior. When the IMPORTDATA function is called on an XLS-file, it invokes the XLSREAD function. There were intentional changes made to XLSREAD in MATLAB 7.0 (R14) to provide support for files such as Excel workbooks that can have multiple sheets. For more information on this function, enter the following command at the MATLAB command prompt:
doc xlsread

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!