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

1 次查看(过去 30 天)
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 个评论
mina massoud
mina massoud 2019-5-9
编辑:dpb 2019-5-9
% 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

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

标签

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by