Read IW SLC files into Matlab?

Open the SLC zip file in SNAP, save the file as BEAM-DIMAP. Navigate to the .data folder, the header files (.hdr) contain the information you need to read the SLC .img files in Matlab, replace Y_SIZE with the lines value from the header file, replace X_SIZE with the samples value. The data type is given as an IDL type code, you can look up the code here:

http://www.exelisvis.com/docs/IDL_Data_Types.html

and match the code with the Matlab data type:

https://se.mathworks.com/help/matlab/numeric-types.html

For example if the header gave the data type as 2, this is the IDL code for a 32bit floating point number, then you would replace DTYPE with the Matlab data type float32.

To read a file:
data = multibandread('INPUT_FILENAME.img', [Y_SIZE, X_SIZE, 1], 'DTYPE', '0', 'bsq', 'ieee-be');

To write a file:
multibandwrite(data, 'OUTPUT_FILENAME.img', 'bsq', 'precision', 'DTYPE', 'machfmt', 'ieee-be');

2 Likes