Agilent Technologies FS2010 Manual de Serviço Página 244

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 243
236 Agilent Signal Generators Programming Guide
Creating and Downloading Waveform Files
Creating Waveform Data
Line Code—Create I and Q data
1
2
3
4
5
6
7
8
9
10
11
const int NUMSAMPLES=500;
main(int argc, char* argv[]);
{
short idata[NUMSAMPLES];
short qdata[NUMSAMPLES];
int numsamples = NUMSAMPLES;
for(int index=0; index<numsamples; index++);
{
idata[index]=23000 * sin((2*3.14*index)/numsamples);
qdata[index]=23000 * cos((2*3.14*index)/numsamples);
}
Line Code Description—Create I and Q data
1 Define the number of waveform points. Note that the maximum number of waveform points that you can set
is based on the amount of available memory in the signal generator. For more information on signal generator
memory, refer to “Waveform Memory” on page 220.
2 Define the main function in C++.
4 Create an array to hold the generated I values. The array length equals the number of the waveform points.
Note that we define the array as type short, which represents a 16–bit signed integer in most C++ compilers.
5 Create an array to hold the generated Q values (signed 16–bit integers).
6 Define and set a temporary variable, which is used to calculate the I and Q values.
Vista de página 243
1 2 ... 239 240 241 242 243 244 245 246 247 248 249 ... 395 396

Comentários a estes Manuais

Sem comentários