raised cosine filter frequency domain

조회 수: 5 (최근 30일)
DongShin Yang
DongShin Yang 2017년 5월 3일
댓글: Saswat Mund 2021년 10월 27일
I am coding raised cosine filter in frequency domain directly.
I do not want to use FFT.
I am coding raised cosine filter in frequency domain directly.
beta=0; % roll off factor fs=10; % sampling factor f=[-10:1/fs:10]; % frequency domain
RC=zeros(1,length(f)); % Raised cosine filter mamory for i=1:1:length(f) if f(i) <= (1-beta)/(2*T) RC(i)=T;
elseif f(i) > (1-beta)/(2*T) || f(i) <= (1+beta)/(2*T)
RC(i)=T/2*(1+cos( ((pi*T)/beta) * ( f(i) -(1-beta)/(2*T) ) ) );
     else RC(i)=0; end end
I made the code. ploting RC was a little wrong. I think
elseif f(i) > (1-beta)/(2*T) || f(i) <= (1+beta)/(2*T)
RC(i)=T/2*(1+cos( ((pi*T)/beta) * ( f(i) -(1-beta)/(2*T) ) ) );
was wrong.
  댓글 수: 1
Saswat Mund
Saswat Mund 2021년 10월 27일
replace || with &&
as || reprsents the 'or' while && represents 'and' so for getting frequency spectrum with beta we need to use && as the if else.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Filtering에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!