Re: question# EE - 电子工程
b*k
1 楼
A1 = rshift(A);
A = A(:);
A1 = A1(:);
n = length(A);
x = [A; A1((2:n)')];
c1 = (1:n)';
c2 = (0:n-1);
H = c1(:, ones(n, 1)) + c2(ones(n, 1), :);
B = x(H); is your answer
A = A(:);
A1 = A1(:);
n = length(A);
x = [A; A1((2:n)')];
c1 = (1:n)';
c2 = (0:n-1);
H = c1(:, ones(n, 1)) + c2(ones(n, 1), :);
B = x(H); is your answer