Click here to Skip to main content
16,016,391 members
Articles / Desktop Programming / Windows Forms
Article

Simulating Signal recovery

Rate me:
Please Sign up or sign in to vote.
1.50/5 (7 votes)
11 Jun 2008CPOL 25.2K   485   9   5
NRZ, Bipolar AMI, M Level, PSK, FSK, ASK
Image 1

Introduction

this application needs input a bit string, deltha and sample to get the recovered signal.

Using the code

class classGrafica has 19 methods NRZ, BIPOLAR, ASK, PSK...

NRZ method

C#
public PointPairList NRZ()
{
PointPairList ptosnrz = new PointPairList();
int i;
int j;
int val;
double[] punto = new double[lenght];
for (i = 0; i < lenght; i++)
{
punto[i] = Convert.ToInt32(bits[i].ToString());
}
double y;
val = 0;
for (j = 0; j < lenght; j++)
{
y = (double)punto[j] * 5;
for (i = 0; i < muestra; i++)
{
ptosnrz.Add(val, y);
val++;
}
}
return ptosnrz;
}

Bipolar Method

C#
public PointPairList BIPOLAR()
{
PointPairList ptosbipolar = new PointPairList();
int i;
int j;
int val;
double[] punto = new double[lenght];
for (i = 0; i < lenght; i++)
{
punto[i] = Convert.ToInt32(bits[i].ToString());
}
double y;
int p;
val = 0;
p = 2;
for (j = 0; j < lenght; j++)
{
y = (double)punto[j];
if (y == 1)
{
y = Math.Pow(-y, p);
p++;
}
y = y * 5;
for (i = 0; i < muestra; i++)
{
ptosbipolar.Add(val, y);
val++;
}
}
return ptosbipolar;
}

In the source code are everything to make it works...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Systems / Hardware Administrator
Mexico Mexico
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 1 Pin
Luc Pattyn28-Jan-10 13:44
sitebuilderLuc Pattyn28-Jan-10 13:44 
QuestionTengo unas preguntas sobre esto... Pin
je_gonzalez11-Jun-08 15:11
je_gonzalez11-Jun-08 15:11 
Si fuera posible, contactame al je_gonzalez@hotmail.com
AnswerRe: Tengo unas preguntas sobre esto... Pin
pechan0000011-Jun-08 15:49
pechan0000011-Jun-08 15:49 
Question??? Pin
Joel Palmer11-Jun-08 10:34
Joel Palmer11-Jun-08 10:34 
AnswerRe: ??? Pin
pechan0000011-Jun-08 12:04
pechan0000011-Jun-08 12:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.