Can this binary reading FORTRAN function file be replicated in MATLAB?
조회 수: 9 (최근 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!