Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Master Thesis Codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Renaud Gonce
Master Thesis Codes
Commits
e1231e86
Commit
e1231e86
authored
Jun 12, 2020
by
Renaud Gonce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
e6940243
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
pammod
pammod
+20
-0
No files found.
pammod
0 → 100644
View file @
e1231e86
function [s] = pammod(N_symbols,M)
% Randomly produces a sequence of N_symbols symbols, using a PAM modulation
% with parameter M, giving the number of possible symbol values. M should
% be a power of 2 ; the number of bits per symbol is then given by log_2(M)
symbols_TX = (rand(N_symbols,1)-0.5)*M;
s = zeros(N_symbols,1);
for i = 1:N_symbols
if symbols_TX(i) == 0
s(i) = -1;
elseif symbols_TX(i) < 0
s(i) = floor(symbols_TX(i))*2+1;
elseif symbols_TX(i) > 0
s(i) = ceil(symbols_TX(i))*2-1;
end
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment