find()
Finds the indices of the conditions that are true. Use with all simulation data
Syntax
indices = find(condition)
Arguments
| Name | Description | Type | Required |
|---|---|---|---|
| condition | condition | string | yes |
Examples
Given an S-parameter data swept as a function of frequency, find the value of S 11 at 1GHz.
index_1 = find(freq == 1GHz)
data = S11[index_1]
Given an S-parameter data swept as a function of frequency, find the values of the frequencies where the magnitude of S 11 is greater than a given value.
lookupValue = 0.58
indices = find(mag(S11) > lookupValue))
firstPoint = indices[0]
lastPoint = indices[sweep_size(indices)-1]
freqDifference = freq[lastPoint]- freq[firstPoint]
The following examples assume a Harmonic Balance data vtime, and a marker m1.
Find the dependent value at the marker:
vVal = find(indep(vtime) >= indep(m1) && indep(vtime) <=indep(m1))
Find all the dependent values less than that of the m1 or the value at m1:
vVal = find(indep(vtime) < indep(m1) || indep(vtime) == indep(m1))
Find all the dependent values that are not equal to m1:
vVal = find(indep(vtime) != indep(m1))
Defined in
$HPEESOF_DIR/expressions/ael/utility_fun.ael
See Also
Notes/Equations
The find function will return all the indices of the conditions that are true. If none of the conditions are true, then a -1 is returned. The find function performs an exhaustive search on the given data. The supplied data can be an independent or dependent data. In addition, the dimension of the data that is returned will be identical to the dimension of the input data.
The find function can accept conditionals such as ==, !=, >, <, >= and <=, and logical operators such as && and ||.
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()