Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2019-1-software-lab-1
/
0509_team1
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-09 16:50:34 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
54d71c4a72985d9662a59c930fe3723d90d97eae
54d71c4a
1 parent
84f4ac2f
channel revised
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
constellation/constellation/channel.h
constellation/constellation/channel.h
View file @
54d71c4
...
...
@@ -6,9 +6,24 @@
#include "variables.h"
class
Cchannel
{
public
:
Cchannel
()
{}
;
Cchannel
();
float
*
s
;
// trasmitted signal
float
r
[
Nbits
/
Nbitspersymbol
*
Nsamplespersymbol
];
// corrupted signal
float
r
[
Nbits
];
// corrupted signal
float
noise
[
Nbits
];
void
AWGN
();
};
Cchannel
::
Cchannel
()
{
default_random_engine
generator
;
normal_distribution
<
double
>
myGauss
(
0
,
No
/
2
);
for
(
int
i
=
0
;
i
<
Nbits
;
i
++
)
noise
[
i
]
=
myGauss
(
generator
);
}
void
Cchannel
::
AWGN
()
{
for
(
int
i
=
0
;
i
<
Nbits
;
i
++
)
r
[
i
]
=
s
[
i
]
+
noise
[
i
];
}
#endif
\ No newline at end of file
...
...
Please
register
or
login
to post a comment