LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array manipulations

Solved!
Go to solution

Hi,

 

I am working on acquiring data into arrays.

 

1. How do I fill arrays coulmnwise. From what I observe, it is filled row-wise all the time. I want the filling to happen columnwise.

 

2.  In row-wise filling of the array, how do I add up all the elements of a particular column?

 

Thanks.

Dheeraj Bharadwaj
IIT-Madras
0 Kudos
Message 1 of 13
(3,155 Views)

Could you please explain what your application is?

 

 

 

 

 

Regards,

Prashant

0 Kudos
Message 2 of 13
(3,150 Views)

Hi Dheeraj,

Check this example.

Regards,

Nitzz 

(Give kudos to good Answers, Mark it as a Solution if your problem is Solved:smileywink:)   

Message 3 of 13
(3,148 Views)

Are you working with 1D or 2D arrays?

 

If you are working on 1D arrays then you just need to exapnd the array down instead of sideways.

 

If you are working with a 2D array then you can simply add a transpose array function to get it to display in columns instead of rows. See below

Untitled-1.png

Tim
GHSP
Message 4 of 13
(3,134 Views)

Hi Dheeraj,

 

If your array is 2 D array you can use transpose array function for changing rows to colums.

 

After transposing that you can use index array function.

 

The output of the index array function should be given to a sigma block found in Mathematics.

This will give you the sum of the elements of the column you are looking for.

 

Does this help??

"Winning isn't everything, Its the only thing"
Message 5 of 13
(3,129 Views)

@tigs

 

Please tell me where this sigma block exists. I am unable to locate it. I use LabVIEW 8.5

 

@nitzz

 

I'm sorry again, but the file you attached doesn't open because I use version 8.5

 

Thanks for your replies everyone, they really helped.

Dheeraj Bharadwaj
IIT-Madras
0 Kudos
Message 6 of 13
(3,096 Views)
Solution
Accepted by topic author dheeraj2102

Hi Dheeraj,

 

Sorry for that. I forgot about your LV version. This one is in 8.5. You can have a look. Everything that you need is explained on the block diagram.


Regards,

Nitzz

(Give kudos to good Answers, Mark it as a Solution if your problem is Solved:smileywink:)    

Message 7 of 13
(3,078 Views)

The sigma block (Add array element block) is located at :---

 

Right click---> Numeric---> Add array element.

 

Does this solve ur problem 

"Winning isn't everything, Its the only thing"
0 Kudos
Message 8 of 13
(3,068 Views)

Just click on Accept as solution when your problem is solved.

"Winning isn't everything, Its the only thing"
0 Kudos
Message 9 of 13
(3,065 Views)

Check this:

 

Sigma block(Add array element)

"Winning isn't everything, Its the only thing"
Message 10 of 13
(3,058 Views)