Hello, I have a .pro script (IDL) and I want to implement in Matlab. I don't know the equivalent of READU (read unformatted file) of IDL in Matlab. The original script was:
OPENR, lun, fileName2, /GET_LUN ; read the input filevar0a = BYTARR(4) ; create array to load 4 char source program identifiervar0b = var0a; ; create 2nd array to load 4 char file type identifiervar1 = FLTARR(1)var2 = LONARR(2)var3 = DBLARR(4)READU, lun, var0a, var1, var0b, var2, var3
If I try to open the file with notepad I see only symbols.
I have used
fid = fopen('GSS1_t001_cx_ImgRall.dat');col = fread(fid);fclose(fid);
and I get a column vector, but I have to assign as made in IDL, so I would like to get an array of 4 char, an array of one element, an array of 4 char, an array of two elements, an array of four elements.
I don't know the use of lun. Maybe it tells us the number of times that we have to get the results.
Best Answer