xrc.m
Upload User: loeagle
Upload Date: 2013-03-02
Package Size: 1236k
Code Size: 0k
Development Platform:

Matlab

  1. function [y] = xrc(f,alpha,T);
  2. % [y]=xrc(f,alpha,T)
  3. %  Evaluates the expression Xrc(f). The parameters alpha and T
  4. %  must also be given as inputs to the function.
  5. if (abs(f) > ((1+alpha)/(2*T))),
  6.   y=0;
  7. elseif (abs(f) > ((1-alpha)/(2*T))),
  8.   y=(T/2)*(1+cos((pi*T/alpha)*(abs(f)-(1-alpha)/(2*T))));
  9. else
  10.   y=T;
  11. end;