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

📄 mpsk_pulses.m

📁 無線通訊系統仿真原理與應用 詳細介紹通訊的仿真方法
💻 M
字号:
function [x] =mpsk_pulses(M,nsymbols,nsamples)
% Software given here is to accompany the textbook: W.H. Tranter, 
% K.S. Shanmugan, T.S. Rappaport, and K.S. Kosbar, Principles of 
% Communication Systems Simulation with Wireless Applications, 
% Prentice Hall PTR, 2004.
%
% This function genrates a random MPSK  complex NRZ waveform of 
% length nsymbols; Each symbol is sampled at a rate of nsamples/bit
u = rand(1,nsymbols);rinteger= round ((M*u)+0.5);
phase = pi/M+((rinteger-1)*(2*pi/M));
for m=1:nsymbols
   for n=1: nsamples
      index = (m-1)*nsamples + n;
      x(1,index) = exp(i*phase(m));
   end
end
% End of function file.

⌨️ 快捷键说明

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