Home | Develop | Download | Contact
testprog2.c

Programa para el testeo de un canal BSC.

Autor
Fernando Pujaico Rivera
Fecha
07-05-2011
/*
* testprog1.c
*
* Copyright 2011 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*/
#include <config.h>
#include <stdlib.h>
#include <pds/pdscm.h>
int main(int argc, char** argv)
{
PdsBVector *X=NULL;
PdsBVector *Y=NULL;
PdsBsc *Channel=NULL;
X=pds_bvector_new(32);
Y=pds_bvector_new(32);
Channel=pds_bsc_new(0.1);
printf("BSC\np=0.1\n\n");
pds_bvector_init_rand(X,0.5);
pds_bsc_evaluate(Channel,X,Y);
printf("Input : ");
pds_bvector_printf(X);
printf("Output: ");
pds_bvector_printf(Y);
pds_bsc_free(Channel);
pds_bvector_free(Y);
pds_bvector_free(X);
printf("\n");
return EXIT_SUCCESS;
}

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed