function y=integrate(x)
% INTEGRATE(x) integrate vector
[nx nz]=size(x);
if nz > nx, nx=nz; end

s=0.;
for i=1:nx
s=s+x(i);
y(i)=s;
end
