]> Creatis software - CreaPhase.git/blobdiff - utilities_ESRF/readedfheader.m
useful functions for simulations, created by ESRF people mainly (free to use)
[CreaPhase.git] / utilities_ESRF / readedfheader.m
diff --git a/utilities_ESRF/readedfheader.m b/utilities_ESRF/readedfheader.m
new file mode 100644 (file)
index 0000000..132f428
--- /dev/null
@@ -0,0 +1,11 @@
+% function hd=readedfheader(fid)
+
+function hd=readedfheader(fid)
+
+headerlength = 512;
+closing = '}';
+hd = fscanf(fid,'%c',headerlength);
+
+while not(strcmp(hd(end-1),closing))
+       hd = [hd fscanf(fid,'%c',headerlength)];
+end