home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / SNNSV32.ZIP / SNNSv3.2 / tools / sources / mkout.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-25  |  1.1 KB  |  49 lines

  1. /*****************************************************************************
  2.   FILE           : mkout.c
  3.   SHORTNAME      : 
  4.   SNNS VERSION   : 3.2
  5.  
  6.   PURPOSE        : create snns output patten
  7.   NOTES          :
  8.  
  9.   AUTHOR         : Ralf Huebner 
  10.   DATE           : 2.4.93
  11.  
  12.   CHANGED BY     : 
  13.   IDENTIFICATION : @(#)mkout.c    1.3 2/28/94
  14.   SCCS VERSION   : 1.3
  15.   LAST CHANGE    : 2/28/94
  16.  
  17.              Copyright (c) 1990-1994  SNNS Group, IPVR, Univ. Stuttgart, FRG
  18.  
  19. ******************************************************************************/
  20.  
  21.  
  22. #include <stdio.h>
  23.  
  24. #define RAWNUM 8
  25.  
  26. main(int argc, char *argv[])
  27.  
  28. {
  29.    int i, units, active;
  30.  
  31.    if ((argc==1) || (int) strcmp(*++argv, "-h")==0 ) {
  32.       fprintf (stderr, "create snns output patten\n\n");
  33.       fprintf (stderr, "  usage: mkout <#units> <active_unit>\n\n");
  34.       exit(0);
  35.    }
  36.    units = atoi(*argv);
  37.    active = atoi(*++argv);
  38.    for (i=0; i<units; i++) {
  39.       if ( (i % RAWNUM == 0) && (i != 0) )
  40.           printf("\n");
  41.       if (i+1==active)
  42.           printf ("1.000 ");
  43.       else
  44.           printf ("0.000 ");
  45.    }
  46.    printf ("\n");
  47. }
  48.    
  49.