]> Creatis software - CreaPhase.git/blobdiff - utilities_ESRF/isoctave.m
useful functions for simulations, created by ESRF people mainly (free to use)
[CreaPhase.git] / utilities_ESRF / isoctave.m
diff --git a/utilities_ESRF/isoctave.m b/utilities_ESRF/isoctave.m
new file mode 100644 (file)
index 0000000..e2110f8
--- /dev/null
@@ -0,0 +1,15 @@
+% function [ ret ] = isoctave ()
+% equal to 1 when executed from octave, to 0 when executed from non-octave
+
+% Author: P. Cloetens <cloetens@esrf.fr>
+% 
+% 2006-06-04 P. Cloetens <cloetens@esrf.fr>
+% Initial revision
+
+function [ ret ] = isoctave ()
+    if exist('OCTAVE_VERSION','builtin')
+        ret = 1;
+    else
+        ret = 0;
+    end
+end