フィルターのクリア

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 日間)
mina massoud
mina massoud 2019 年 5 月 9 日
編集済み: dpb 2019 年 5 月 9 日
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 Center および File ExchangeDownloads についてさらに検索

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by