27 fprintf(
" Starting loop speed-test with d=%d and n=%d runs...\n ",d,n);
33 A(i,j) = exp(-i+j*.3) - sin(i*j*pi);
39 [x,y] = meshgrid(idx,idx);
40 all = [reshape(x,1,[]); reshape(y,1,[])];
47 [x,y] = meshgrid(idx,idx);
48 all = [reshape(x,1,[]); reshape(y,1,[])];
52 A(i,j) = exp(-i + j*.3) - sin(i * j * pi);
57 [y,x] = meshgrid(idx,idx);
58 A = exp(-x + y*.3) - sin(x .* y * pi);
function LoopTest(d)
LoopTest: A quick test to show how slow looping in MatLab can be.