09.12.2012 Views

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

HP 8590 E & L Series Spectrum Analyzers and HP 8591C Cable TV ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LOG Logarithm<br />

Prerequisite Comm<strong>and</strong>s: TRDEF when using a user-defined trace. ACTDEF or VARDEF when<br />

using a user-defined variable. TS when using trace data.<br />

Related Comm<strong>and</strong>s: EXP.<br />

Example 1<br />

OUTPUT 718~"IP~"<br />

OUTPUT 718;"VAIiDEF P,OWER,O;"<br />

Initializes spectrum analyzer<br />

Dt$nes a user-de$ned variable, called P-OWE& <strong>and</strong> sets<br />

it equal to 0.<br />

OUTPUT 718;"LOG P,OWER,S,lO;" P-OWER = 10x LOG(5)<br />

OUTPUT 718;"P,OWER?;" Returns value to computer:<br />

ENTER 718;N Assigns value to computer variable.<br />

DISP USING "D.DD,K";N;" dB" Displays value on the computer screen.<br />

Example 2<br />

This example finds the natural exponential of a number <strong>and</strong> uses the LOG function to return<br />

the original source value of the EXP function.<br />

10 OUTPUT 718;"VARDEF E-XP,O;"<br />

20 OUTPUT 718;"EXP E,XP,2,2.30259;"<br />

30 OUTPUT 718;"E_XP?;"<br />

40 ENTER 718;Value<br />

50 PRINT Value<br />

60 OUTPUT 718;"LOG EmXP,E-XP,2.30259;"<br />

70 OUTPUT 718*"E XP'."<br />

, - *,<br />

80 ENTER 718;Logvalue<br />

90 PRINT Logvalue<br />

100 OUTPUT 718;"VARDEF E-XPY,O;"<br />

110 OUTPUT 718;"EXP E,XPY,-5,2.30259;"<br />

120 OUTPUT 718;"E_XPY?;"<br />

130 ENTER 718;Value2<br />

140 PRINT Value2<br />

150 OUTPUT 718;"LOG E-XPY,E-XPY,2.30259;"<br />

160 OUTPUT 718;"E,XPY?;"<br />

170 ENTER 718;Logval<br />

180 PRINT Logval<br />

190 END<br />

Dt$lnes a variable called E-XI!<br />

Fino!s the natural exponential of 2.<br />

Returns the natural exponential of 2.<br />

I?+& the value of the exponential.<br />

Uses the log function on the exponential<br />

value.<br />

The log of the exponential value is approximately<br />

2.<br />

Declares a variable called E-XPk:<br />

Finds the natural exponential of -5.<br />

Returns the value of the natural exponential<br />

of -5.<br />

FVints the value of the exponential.<br />

Uses the log fan&ion on the exponential<br />

value.<br />

The log of the exponential value is approximately<br />

-5.<br />

Programming Comm<strong>and</strong>s 5-299

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!