


function go


0001 %function go 0002 nh = 100; 0003 ni = 200; 0004 wh = rand(nh,ni) * 0.01; 0005 x = rand(ni,1) * 0.01; 0006 result = zeros(nh,1); 0007 0008 tic; 0009 for rep = 1:100000 0010 result = result + wh * x; 0011 end 0012 ti = toc; 0013 0014 fprintf(1,'Matlab: seconds %f %f\n',ti,result(1));