function [v1,v2] = splithalf(v)
L = fix(length(v)/2);
v1 = v(1:L);
v2 = v(L+1:end);

