I am trying to take an array [1 2 3] and scale the indices of each of the elements by three. So, as a result, I am hoping to have [1 0 0 2 0 0 3]. So far, I am using a for loop:
ytemp = zeros(length(input), 1);
for idx = 1:length(y_fft)
ytemp(idx * 3) = y_fft(idx);
Is there a better way to do this?