Why do I receive an error when specifying row or column subsetting for a band-sequential file using the MULTIBANDREAD function in MATLAB 7.0.1 (R14SP1)?

1 view (last 30 days)
I have a band-sequential data file, 'data.img', that has an unequal number of rows and columns. When I execute the following command:
g = multibandread('data.img',[96 64 6],'uint8',0,'bsq','ieee-le',{'Column','Direct',1});
I receive the following error:
??? Error using ==> reshape
To RESHAPE the number of elements must not change.
Error in ==> multibandread>readbsqdata at 310
im(:,c,:) = reshape(data,size(im(:,c,:)));
Error in ==> multibandread at 99
im = readbsqdata(info);
This error occurs when the interleave input argument is 'bsq', the number of rows and columns in the data file are not equal, and the subsetting parameter uses either 'Row' or 'Column' for the dimension.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in MATLAB 7.0.1 (R14SP1) in the way that the MULTIBANDREAD function handles specifying either the 'Row' or 'Column' subsetting parameters on files using the 'bsq', or band-sequential interleaving format when the number of rows and columns are unequal.
There are currently no known workarounds.

More Answers (0)

Products


Release

R14SP1

Community Treasure Hunt

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

Start Hunting!