How does MATLAB code square wave fiter?
조회 수: 7 (최근 30일)
이전 댓글 표시
%Transmitted signal is iidx
iidx = zeros(N0,1); % N0 is the number of code.
iidx = transpose(round(rand(1,N0))*2-1); %iidx of i.i.d.(independent and identically distributed)
Tk=(rand(1,k)*MaxDelay); %Tk is delay, MaxDelay is Maximum delay of Tk.
Tk=sort(Tk);
Ck=randn(1,k); % Ck is the value of Channel Impulse Response
%Raised Cosine filtering case: Raisd Cosine fitering Channel is hRCf.
Beta = 0.22; % Roll-off factor for the Raised Cosine filter.
ndashi = -10*Tc:Tc/J:(10*Tc+Tc/J*(L-1)); %ndashi is Time vector (sampling intervals, Tc = 1, J =1, L is delay.
Rck=zeros(0,length(ndashi));
for k = 1:K, % k is number of paths, K is maximum number of path.
ndashi = -10*Tc:Tc/J:(10*Tc+Tc/J*(L-1));
t = ndashi - Tk(k); % delay between 0 and 1
t = t+1e-10; %the denominator would be zero at t=0 (or manually set “Rcone(t=0)=1”)
Rcone = (sin(pi*t/T)./(pi*t/T)).*(cos(Beta*pi*t/T)./(1-(2*Beta*t/T).^2)); %Raised Cosine filter
Rck = [Rck; Rcone]; % Raised-Cosine FIR filter
end
hRCf = Ck * Rck; %
Now, I want to change Raised cosine fiter to square wave fiter?
How can I make the square wave fiter such as sampling intervals of Raised Cosine fiter?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Filtering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!