EasyManuals Logo
Home>Agilent Technologies>Portable Generator>N5182A

Agilent Technologies N5182A Programming Guide

Agilent Technologies N5182A
366 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #247 background imageLoading...
Page #247 background image
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;
}

Table of Contents

Other manuals for Agilent Technologies N5182A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies N5182A and is the answer not in the manual?

Agilent Technologies N5182A Specifications

General IconGeneral
BrandAgilent Technologies
ModelN5182A
CategoryPortable Generator
LanguageEnglish

Related product manuals