diff --git a/matlab/reporting/@report/compile.m b/matlab/reporting/@report/compile.m
index 9a7170e5d785a14bee15ddd7a3ffe823278a3f16..91a3a73768d39bf887a1a0fa20d19913cdd088b0 100644
--- a/matlab/reporting/@report/compile.m
+++ b/matlab/reporting/@report/compile.m
@@ -50,7 +50,12 @@ if isempty(compiler)
     compiler = strtrim(compiler);
     o.compiler = compiler;
 end
-[status output] = system([compiler ' ./' o.filename], '-echo');
+
+if exist('OCTAVE_VERSION')
+    status = system([compiler ' ./' o.filename], 0);
+else
+    status = system([compiler ' ./' o.filename], '-echo');
+end
 [junk, rfn, junk] = fileparts(o.filename);
 
 if status ~= 0