user1578688
user1578688

Reputation: 427

Load satellite image in Matlab

I've a problem about how can I load a Landsat image on Matlab. My image is in format .img and have the following information:

Columns and rows= 9487 x 8543
Number of bands= 6
Cellsize= 25 x 25
Source Type= continuous
Píxel type= unsigned integer
Pixel Depth= 16 bit
Scale factor= 0,9996

And this is my code:

IM= multibandread('2000.img',[9487, 8543, 6],'int16',0,'ieee-le',{'Row','Range',[9487 8543]);

But there's the following error:

Error: Unbalanced or unexpected parenthesis or bracket.

I've tried to change but it doesn't work. What can I do?

Thanks in advance,

Emma

Upvotes: 0

Views: 1649

Answers (2)

Dennis Jaheruddin
Dennis Jaheruddin

Reputation: 21563

I think you may want to leave the subset argument out completely, this in addition to using unsigned uint16, try the following:

multibandread('2000.img',[9487, 8543, 6],'uint16',0,'ieee-le')

Note that with your current call it appears that you are trying to extract row 9487 to 8543.

Upvotes: 0

Junuxx
Junuxx

Reputation: 14271

Dennis is right, you're missing a closing curly brace. It should be inserted between the bracket and the parenthesis at the end like this:

IM= multibandread('2000.img',[9487, 8543, 6],'int16',0,'ieee-le',{'Row','Range',[9487 8543]});

Upvotes: 2

Related Questions