필터 지우기
필터 지우기

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