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
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
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...