?? mary.m
字號:
% File: mary.m
% 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.
%
function y= mary(levels,m,n)
% m = number of symbols
% n = samples per symbol
l = m*n; % Total sequence length
y = zeros(1,l-n+1); % Initalize output vector
lm1 = levels-1;
x=2*fix(levels*rand(1,m))-lm1;
for i = 1:m % Loop to generate info symbols
k = (i-1)*n+1;
y(k) = x(i);
end
y = conv(y,ones(1,n)); % Make each symbol n samples
% End of function file.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -