Owning Palette: Linear Algebra VIs
Requires: Full Development System
Finds the trace of Input Matrix. Wire data to the Input Matrix input to determine the polymorphic instance to use or manually select the instance.
Use the pull-down menu to select an instance of this VI.
Add to the block diagram | Find on the palette |
Input Matrix is a square or rectangular matrix. If Input Matrix is an empty matrix, this VI sets trace to NaN and returns an error. | |
trace is the sum of the main diagonal of Input Matrix. | |
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. |
Input Matrix is a square or rectangular matrix. If Input Matrix is an empty matrix, this VI sets trace to NaN and returns an error. | |
trace is the sum of the main diagonal of Input Matrix. | |
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. |
The VI uses the following equation to compute the trace.
where A is Input Matrix, tr(A) is trace, and m and n are the number of rows and the number of columns of Input Matrix, respectively.
Refer to the Linear Algebra Calculator VI in the labview\examples\Mathematics\Linear Algebra directory for an example of using the Trace VI.