0

In this discussion, the result of fft is indices (0:N-1). fftshift simply converts that to [(N/2:N-1) (0:(N/2-1))].

I want to convert original range (O:N-1) to (t/N: t/N + 1), where t is time and assume integer and divisibel by N. I am using the Galois vectors as my datatype. Is this possible with built-in functions in Matlab? How can you achieve it in Matlab?

4

1 回答 1

1

In general, given a data vector, if you want to shift the range from 0:N-1 to [a:N-1 0:a-1] for some a (0<=a<=N), you can do it very easily:

N = 10;
a = 3;
data = rand(1,N); % Example data. Assumed range: 0:N-1
shiftedData = data([a+1:N 1:a]);
于 2013-11-11T11:23:02.863 回答