LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to calculate the sum of the values of some columns of a table

Solved!
Go to solution

hi

i want to get in the column averages just the average of the values of some columns not all the columns of the table.what i have to change exactly in this block diagram.even if the size of the table is 25,i want the division to be the number of values in each column(= number of rows)

21.png

just like that:

11.png

0 Kudos
Message 1 of 23
(4,237 Views)

Check for "Mean.vi" in Mathematics palette. Replace your code inside the for loop with that vi.

 

Something like this you should have.

 

MeanValue.png

-----

The best solution is the one you find it by yourself
Message 2 of 23
(4,231 Views)

but it doesn't change anything,how could i get the values of just some columns, number 2 and 5 for example

0 Kudos
Message 3 of 23
(4,217 Views)

For that you have to index the array like this.

 

MeanValueSelected.png

 

I would recommend you to go through some basic training materials in LabVIEW which you may find here.

 

Good luck!

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 23
(4,208 Views)

i did exactely what u told me, i think i missed something because i don't get the average value of the rows i want

2.png

 

0 Kudos
Message 5 of 23
(4,201 Views)

I didn't use a Transpose array Smiley Wink

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 23
(4,195 Views)

if i don't use transpose array i will get the average value of each row, i want the average of columns Smiley Sad

0 Kudos
Message 7 of 23
(4,186 Views)

even if i used the 3rd and 5th columns,i get 4 values in the column averages  which is wrong.i want the average values of the column 3 and 5.so just 2 values3.png

0 Kudos
Message 8 of 23
(4,181 Views)

You cannot get 4 elements unless you have 4 values in the array from which you are feeding the index.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 9 of 23
(4,175 Views)

1.pnghere is exactly what i get with the previous blockdiagram

0 Kudos
Message 10 of 23
(4,171 Views)