| ²é¿´: 217 | »Ø¸´: 1 | |||
| µ±Ç°Ö÷ÌâÒѾ´æµµ¡£ | |||
charming1791Òø³æ (СÓÐÃûÆø)
|
[½»Á÷]
¡¾ÇóÖú¡¿½«C³ÌÐòתΪperl ½Å±¾¡¾ÒÑÈ¡Ïû¡¿
|
||
|
Òò±¾ÈËûѧ¹ýperl½Å±¾£¬ÄÄλÄܰïæ½«ÏÂÃæÒ»¶Î´úÂëתΪperl½Å±¾£¬Ð»Ð»£¡ #include #include main (argc, argv) int argc; char **argv; { float iq; int i, j, nbytes,ll; int nrig, nsamp; short *veti; float *vetf; char fi[100],fo[100]; FILE *ifp, *ofp; if (argc != 5) { printf ("usage: short2complex <#lines> <#samples> filein fileout\n" ;exit(1); } sscanf (argv[1], "%i", &nrig); sscanf (argv[2], "%i", &nsamp); sscanf (argv[3], "%s", fi); sscanf (argv[4], "%s", fo); if(!(ifp=fopen(fi,"rb" )) {printf("Cannot open input file %s\n",fi); exit(1); } if(!(ofp=fopen(fo,"wb" )) {printf("Cannot open output file %s\n",fo); exit(1); } veti = (short *) malloc (2 * nsamp * sizeof (short)); vetf = (float *) malloc (2 * nsamp * sizeof (float)); for (i = 0; i < nrig; i++) { fread (veti, sizeof (short), 2 * nsamp, ifp ); for (j = 0; j < nsamp * 2; j++) { vetf[j] = (float) veti[j]; } fwrite (vetf, sizeof (float), 2 * nsamp, ofp); } fclose(ofp); fclose(ifp); } [ Last edited by ²¨²»¶¯ on 2010-1-13 at 20:48 ] |
» ²ÂÄãϲ»¶
ѹ¹ú¼ÒÒ»ÇøÏߣ¬Çóµ¼Ê¦ÊÕÁô£¬Óж÷±ØÐ»£¡
ÒѾÓÐ7È˻ظ´
081200-11408-276ѧ˶Çóµ÷¼Á
ÒѾÓÐ4È˻ظ´
22408 359·Öµ÷¼Á
ÒѾÓÐ4È˻ظ´
±¾¿ÆÐÂÄÜÔ´¿ÆÑ§Ó빤³Ì£¬Ò»Ö¾Ô¸»ªÀíÄܶ¯285Çóµ÷¼Á
ÒѾÓÐ5È˻ظ´
Ò»Ö¾Ô¸»ª±±µçÁ¦´óѧÄܶ¯×¨Ë¶£¬293£¬Çóµ÷¼Á
ÒѾÓÐ5È˻ظ´
µ÷¼Á310
ÒѾÓÐ7È˻ظ´
ʳƷ¹¤³Ìר˶һ־ԸÖк£Ñó309Çóµ÷¼Á
ÒѾÓÐ6È˻ظ´
275Çóµ÷¼Á
ÒѾÓÐ14È˻ظ´
283Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
085602 »¯¹¤×¨Ë¶ 338·Ö Çóµ÷¼Á
ÒѾÓÐ12È˻ظ´
charming1791
Òø³æ (СÓÐÃûÆø)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 4.5
- Ìû×Ó: 211
- ÔÚÏß: 2.6Сʱ
- ³æºÅ: 594385
- ×¢²á: 2008-09-06
- רҵ: RS
²¨²»¶¯(½ð±Ò+0,VIP+0):ºÃµÄ£¬±¾°æ¸ãperlµÄ³æÓѲ»¶à£¬½ð±ÒÒѾÍË»¹¡£ 1-13 20:30
| ûÈËÓ¦Öú£¬È¡Ïû¸ÃÌù£¬°æÖ÷¿É·ñ½«½ð±Ò»¹¸øÎÒ£¿Ð»Ð»£¡ |
2Â¥2010-01-13 15:30:32














;
»Ø¸´´ËÂ¥