Owning Palette: Calculus VIs
Requires: Full Development System
Calculates both function values and the values of the derivative of a given 1D function defined by a formula at equidistant points in an interval.
Add to the block diagram | Find on the palette |
number of points is the number of all calculated points. The independent variable is split into equidistant subpoints. The default is 10. | |
start is the start point of the interval. The default is 0.0. | |
end is the end point of the interval. The default is 1.0. | |
formula is a string describing the function under investigation. The formula can contain any number of valid variables. | |
X Values is the array of equidistant points between start and end. | |
Y Values are the values of the function. | |
Derivative of Y are the values of the derivative of the function at the points X Values. | |
ticks is the time in milliseconds to analyze the formula and to produce the X Values array, Y Values array, and Derivative of Y array. | |
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
Note Even though there is a modified method called optimal step for functions, LabVIEW does not have an optimal step for the Differentiation VI. If you are interested in highly accurate values of differentiation, start with the symbolic differentiation by hand. Then use the Eval y = f(x) Optimal Step VI, where f is the derivative of the function. |
The function and the derivative of f(x) = sin(sinc(x)) are investigated in the interval (–20, 20). The following illustration shows both f(x) and f'(x).
Refer to the 1D Explorer VI in the labview\examples\Mathematics\Optimization directory for an example of using the Differentiation VI.