|
||
mag, magnitude | Returns the magnitude of a complex vector in a real vector |
ph, phase | Returns the phase of a complex vector in a real vector |
j | sqrt(-1) * vec |
re, real | Place the real part of a complex vector in a real vector |
im, imag | Place the imaginary part of a complex vector in a real vector |
db | 20 * lgt(vec) |
log, log10 | Log base 10 of vec |
ln | Natural log |
isdef | test existence of a vector; returns 1 if it exists, 0 otherwise |
exp | e ^ vec |
abs | Absolute value |
sqrt | Square root |
derivx, differentiatex | (Scope Only) Returns the derivative of a vector with respect to the default scale vector (usually time or frequency). |
deriv, differentiate | Returns the derivative of a vector with respect to the current plots scale |
ceil | Returns the ceiling of the vector. |
floor | Returns the floor of the vector. |
integratex | (Scope Only) Returns the integral of a vector with respect to the default scale vector (usually time or frequency). |
integrate | Returns the integral of a vector with respect to the current plots scale |
Returns a vector that is the length of the default vector that is unity for the number of points in its argument and zero thereafter |
Trigonometric functions
sin cos tan atan |
Miscellaneous functions Single argument except as noted
rms | Root Mean Square by trapezoid integration |
rmspts | Root Mean Square by datapoints |
mean, average | Average value by trapezoid integration |
meanpts | Average value by datapoints |
max | Maximum value |
min | Minimum value |
maxscale | Maximum scale value |
minscale | Minimum scale value |
stddev | Standard deviation (rms with average removed) by trapezoid integration |
stddevpts | Standard deviation by datapoints |
pk_pk | Peak to peak |
trise | The 10-90% transition using cursor 0 and cursor 1 to define initial and final value. |
tfall | The 10-90% transition using cursor 0 and cursor 1 to define initial and final value. |
Operation |
Symbol |
Example |
PLUS |
"+" |
x = a + b |
MINUS |
"-" |
x = a - b |
TIMES |
"*" |
x = a * b |
MOD |
"%" |
x = a % b - remainder of integer
division |
DIVIDE |
"/" |
x = a/b |
COMMA |
"," |
x = vreal, vimaginary |
POWER |
"^"
|
xsquared = x^2 |
EQ |
"="
|
if a = b |
GT |
">"
|
if a > b |
LT |
"<" |
if a < b |
GE |
">=" |
if a >= b |
LE |
"<=" |
if a <= b |
NE |
"<>"
|
if a <> b |
AND |
"&"
|
vand = a & b |
OR |
"|" |
vor = a | b |
INDX |
"["
|
vthree = a[3] |
UMINUS, |
"-"
|
x = -b |
NOT |
"~"
|
vnand = ~vand |
Assignment operators that extract the mid part of a vector
vmid=w1[(20,30)] | It makes a new vector,
vmid, using elements 20 through 30 of vector w1. |
vmid=w1[[(500u,600u)]] | Extracts data based on the scale
vector range (time in this case) and makes a new vector out of the data
between 500u to 600u. You can make an accompanying time axis for a new plot: t56 = time[[(500u,600u)]], and then plot vmid vs t56. Of course you can subtract the offset from t56 using the following script: t56 = t56 - 500u. This gives you the power to rearrange data during post processing to make things like "eye" diagrams. |