den:~/tmp/matlab> cat batch.c #include void main() { double s,i,j; s=0; for(i=1; i<=1000; i+=1.0) for(j=1; j<=1000; j+=1.0) s += i*j/666.0; fprintf(stderr, "%g\n",s); } den:~/tmp/matlab> cat startup.m S = 0 for I = 1:1000, for J = 1:1000, S = S + I*J/666; end end fprintf('%d\n',S) quit den:~/tmp/matlab> time ./batch 3.76127e+08 real 0m0.16s user 0m0.15s sys 0m0.01s den:~/tmp/matlab> env DISPLAY="" time matlab -nosplash < M A T L A B > Copyright 1984-1999 The MathWorks, Inc. Version 5.3.0.10183 (R11) Jan 21 1999 To get started, type one of these: helpwin, helpdesk, or demo. For product information, type tour or visit www.mathworks.com. S = 0 3.761265e+08 3000000 flops. real 15.3 user 14.8 sys 0.4