⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 part1a.m

📁 In this program, several statistical fading channel simulators using the Sum-of-Sinusoids (SoS)has b
💻 M
字号:
clc;
close all;
echo off;

fd=100;
M=8;
N=4*M+2;
Ts=1e-4;
Ns=100;

 t=[-5:Ts:5];
    suma=0;
    sumb=0;
    for n=1:M+1
        if n<=M
            a(n)=2*cos(pi*n/M);
            b(n)=2*sin(pi*n/M);
            w(n)=2*pi*fd*cos(2*pi*n/N);
        else
            a(n)=sqrt(2)*cos(pi/4);
            b(n)=sqrt(2)*sin(pi/4);
            w(n)=2*pi*fd;
        end
        suma=suma+(a(n)*cos(w(n)*t));
        sumb=sumb+(b(n)*sin(w(n)*t));
    end
    uc=sqrt(4/N)*suma;
    us=sqrt(4/N)*sumb;
    u=uc+(j*us);
%     u=sqrt(4/N)*(suma+(j*sumb));
 plot([-5:Ts:5],uc);
 figure;
% plot([-10:0.01:10],abs(u));
 plot([-5:Ts:5],us);
 figure;
 plot([-5:Ts:5],abs(u));

[m,n]=hist((uc),100);
sumh=sum(m);
m=m/sumh;
figure;
%subplot(3,1,1), 
plot(n,m);
[m,n]=hist(us,100);
sumh=sum(m);
m=m/sumh;
% subplot(3,1,2), 
plot(n,m);
[m,n]=hist(abs(u),100);
sumh=sum(m);
m=m/sumh;
% subplot(3,1,3), 
plot(n,m);
title('PDF of U(t)');
xlabel('bin values');
ylabel('normalised probability');
% %c=length(u)
% y=xcorr(u,50);
% figure;
% plot([0:0.1:10],real(y));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -