Can this binary reading FORTRAN function file be replicated in MATLAB?
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am workin with old photon statistics data and need to interpret a number of .bin files to be used in MATLAB for analysis.
The loops are regogniseable and it looks like it should be able be converted but there are some phrases that I can't regognise.
The old FORTRAN fucntion is as follows
function lecroy_bin,file,n
n=long(n)
header=bytarr(359)
data=bytarr(n)
openu,u,file,/get_lun
readu,u,header
readu,u,data
free_lun,u
for i=long(0),long(n-1) do begin
if (data(i) lt 128) then begin
data(i)=data(i)+128
endif else begin
data(i)=data(i)-128
endelse
endfor
return,data
end
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Fortran with MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!