Can this binary reading FORTRAN function file be replicated in MATLAB?
6 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fortran with MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!