Thread
:
Rearranging vectors Matlab
View Single Post
Pythagorean
#
3
Sep20-10, 05:33 AM
PF Gold
P: 4,262
%it has to be an even length vector, but:
N = length(x)/2
y = zeros(N,1)
for n = 1:N
y(2*n-1) = n
y(2*n) = N+n
end