% This function generates a variety of power profiles. 
% Baud rate is assumed to be 1 micro second.
% The taps in the profile are spaced T/4 apart.

function [profile]=power_profile(terrain);

% terrain = 1 '2 ray profile'
% terrain = 2 'urban profile'
% terrain = 3 'hilly terrain profile'

switch terrain
  case 1
    profile=zeros(1,163);
    profile(1)=1;
    profile(163)=1;
  case 2
    profile=zeros(1,21);
    profile(1)=10^(-3/10);
    profile(2)=10^(0/10);
    profile(3)=10^(-2/10);
    profile(8)=10^(-6/10);
    profile(10)=10^(-8/10);
    profile(21)=10^(-10/10);
  case 3  
    profile=zeros(1,81);
    profile(1)=10^(-0/10);
    profile(2)=10^(-2/10);
    profile(3)=10^(-4/10);
    profile(4)=10^(-6/10);
    profile(61)=10^(-5/10);
    profile(64)=10^(-10/10);
    profile(70)=10^(-13/10);
    profile(81)=10^(-15/10);
  otherwise
    disp('Terrain options out of range')
end;
