Hi, everyone! i need help to make this , instead of getting a matrix FTTx ( 4x8) i need to get a column vector (1x32) with the same values but i iam not able to do it , thank you

2 views (last 30 days)
Lx=20;
N=4;
P=8;
L=2;
xBuff=zeros(N,1);
b=0.5;
x = filter(sqrt(1-b^2), [1 -b], (1/(sqrt(4)))*(randn(Lx,1)) );
FFTX = zeros(N,P); %%%%%%% FFTX = zeros(N*P,1);
for k = 1 : L : 20 % k=1 ,2,3 .............. etc
nn = k : k + L - 1; %1:2 , 2:3 , 3:4 ; 4:5.............etc
xBuff(1 : N, :) = [ xBuff(L+1 : N, : ) ; x(nn, :) ];
FFTX(:,2:P) = FFTX(:,1:P-1);
FFTX(:,1) = fft(xBuff);
end
  1 Comment
mina massoud
mina massoud on 9 May 2019
Edited: dpb on 9 May 2019
% this is my code but the answer is not the same , i don't know why
Lx=20;
N=4;
P=8;
L=2;
xBuff=zeros(N,1);
b=0.5;
x = filter(sqrt(1-b^2), [1 -b], (1/(sqrt(4)))*(randn(Lx,1)) );
FFTX = zeros(N*P,1);
for k = 1 : L : 20 % BlkSize = KK*F.L, KK integer
nn = k : k + L - 1; %1:2 , 2:3 , 3:4 ; 4:5.............etc
xBuff(1 : N, :) = [ xBuff(L+1 : N, : ) ; x(nn, :) ];
%FFTX(:,2:P) = FFTX(:,1:P-1);
FFTX(2:P,1) = FFTX(1:P-1,1);
FFTX(1:4,1) = fft(xBuff);
end

Sign in to comment.

Answers (0)

Categories

Find more on Downloads in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!