diff()
Calculates the simple numerical first derivative. Can be used to calculate group delay
Syntax
y = diff(data, pad)
Arguments
| Name | Description | Range | Type | Default | Required |
|---|---|---|---|---|---|
| data | data to find numerical derivative | (-∞, ∞) | real, complex | yes | |
| pad | pad the differentiated data with an extra value | [0, 1]† | integer | 0 | no |
| † If pad is 1, then the differentiated data is padded with an extra value (last value of differentiated data) to make it the same length as the data to be differentiated. If 0 (default) then the length of the differentiated data is one less than the length of data to be differentiated | |||||
Examples
group_delay = -diff(unwrap(phaserad(S21),pi) )/ (2*pi)
Defined in
$HPEESOF_DIR/expressions/ael/elementary_fun.ael
See Also
dev_lin_phase(), integrate(), phasedeg(), phaserad(), ripple(), unwrap()
Notes/Equations
This function calculates the first derivative of the dependent data with respect to the inner independent value i.e. dy/dx. The function uses the simple forward finite-divided-difference formulas of 2 values. The error is O(h), where h is the independent step size. The error decreases with smaller values of h. If the data to be differentiated does not have an explicit independent-name, the differentiated data is given an independent name "diffX'.
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()