To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI demonstrates how to programmatically solves differential equations and displays the corresponding coefficients and eigenvalues.
Description
Here is a brief description of the example:
LabVIEW can calculate the value of a system of differential equations at a given time, but does not return the constant coefficients used to perform the calculation. This VI returns the coefficients and corresponding eigenvalues used for these calculations. Because it is possible for some of the coefficients to be zero, duplicate eigenvalues are returned.
Two numeric arrays are returned. The values at corresponding indices of the arrays are coupled in the formula used for calculation. For instance, if the first value in the coefficients array is 1.6 and the first value in the eigenvalues array is -1, that portion of the solution is 1.6*exp(-1*t). When an eigenvalue is repeated, the following values should be another equation in the system.
Note that, because this VI parses the formula from a string and converts the values to numeric, this VI will only work for real numbers. It could be modified to work with complex numbers, but would require some more checking of the formula string.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.