Agilent-technologies N5183A MXG Manuale Utente Pagina 247

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 366
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 246
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 237
Creating and Downloading Waveform Files
Programming Examples
for (int i=0; i<SAMPLES; ++i)
{
iqData[2*i] = AMPLITUDE * sin(two_pi*i/(float)SAMPLES);
iqData[2*i+1] = AMPLITUDE * cos(two_pi*i/(float)SAMPLES);
}
// make sure bytes are in the order MSB(most significant byte) first. (PC only).
char* cptr = (char*)iqData;// cast the integer values to characters
for (int i=0; i<(4*SAMPLES); i+=2)// 4*SAMPLES
{
char temp = cptr[i];// swap LSB and MSB bytes
cptr[i]=cptr[i+1];
cptr[i+1]=temp;
}
// now write the buffer to a file
out_stream.write((char*)iqData, 4*SAMPLES);
return 0;
}
Vedere la pagina 246
1 2 ... 242 243 244 245 246 247 248 249 250 251 252 ... 365 366

Commenti su questo manuale

Nessun commento