Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2019-1-software-lab-1
/
0509_team3
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
임준영
2019-05-12 19:40:01 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d52d0dc99c3949acb33399d00bacad2c783a6606
d52d0dc9
1 parent
340f9bd5
change channel.cpp
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
constellation/constellation/channel.cpp
constellation/constellation/channel.cpp
0 → 100644
View file @
d52d0dc
#include"channel.h"
#include<cstdlib>
using
namespace
std
;
void
Cchannel
::
AWGN
()
{
ofstream
myout
;
myout
.
open
(
"channel.txt"
);
default_random_engine
generator
;
normal_distribution
<
double
>
dist
(
0.0
,
No
);
for
(
int
k
=
0
;
k
<
Nbits
/
Nbitspersymbol
*
Nsamplespersymbol
;
k
++
)
n
[
k
]
=
dist
(
generator
);
matrixadd
(
1
,
Nbits
/
Nbitspersymbol
*
Nsamplespersymbol
,
s
,
n
,
r
);
for
(
int
i
=
0
;
i
<
Nbits
/
Nbitspersymbol
*
Nsamplespersymbol
;
i
++
)
{
myout
<<
r
[
i
]
<<
endl
;
}
myout
.
close
();
}
\ No newline at end of file
Please
register
or
login
to post a comment