LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the average of table row values it should display in next row in libwindow/CVI

Hi,

 

 

How to find the average of table row values it should display in next row in libwindow/CVI

 

Please let me know the solution.

0 Kudos
Message 1 of 2
(3,628 Views)

There isn't a built-in function to perform calculations on thable cells. What you can do is to retrieve thable cells values and calculate the average by yourself.

To retrieve a bunch of cells in a single instruction you can use GetTableCellRangeVals: prerequisite for this function to work correctly is that cells are all included in a Rect structure (shortly, a rectangle) and are all of the same data type. See the help for the function for some explanations and the link to an example of its usage. In Cell range parameter you can pass VAL_TABLE_ROW_RANGE (row) macro to retrieve an entire row. See here for details.

Once you have retrieved cell values in an array, you can pass it to Mean function to calculate the average.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,621 Views)