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 />

Description<br />

The scaling factor may be used to improve numerical computations when calculating logarithms<br />

of integer trace data. For example, the log of a trace value of 8000 is 3.9, which would be<br />

stored as the value 4 in a trace.<br />

The log of trace value of 1 is 0, so the log of a trace containing values from 1 to 8000 would<br />

be compressed to values 0, 1, 2, 3, 4. Computational accuracy can be improved by using the<br />

scaling factor to scale up the log values before they are stored. In this case, because 3.903 is<br />

the log of 8000 <strong>and</strong> the largest positive trace value is 32,767, a scaling factor of 32,767 divided<br />

by 3.903 or 8,395 may be applied to the data. Because EXP <strong>and</strong> LOG are inverse functions, the<br />

EXP comm<strong>and</strong> has a scaling factor that may be used to “undo” the scaling factor of the LOG<br />

comm<strong>and</strong>.<br />

The LOG comm<strong>and</strong> can be used to calculate the natural logarithm by using 2.30259 as the<br />

scaling factor.<br />

The LOG function returns an invalid result if the source is zero or a negative number.<br />

When the source is longer than the destination, the source is truncated to fit. When the source<br />

is shorter than the destination, the last element is repeated to fill the destination.<br />

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

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

Saved successfully!

Ooh no, something went wrong!