06-16-2011 05:03 AM
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.
Solved! Go to Solution.
06-16-2011 05:27 AM
Could you please explain what your application is?
Regards,
Prashant
06-16-2011 05:34 AM - edited 06-16-2011 05:35 AM
Hi Dheeraj,
Check this example.
Regards,
Nitzz
(Give kudos to good Answers, Mark it as a Solution if your problem is Solved)
06-16-2011 07:18 AM
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
06-16-2011 07:23 AM
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??
06-16-2011 10:34 PM
@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.
06-17-2011 12:52 AM
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)
06-17-2011 02:02 AM
The sigma block (Add array element block) is located at :---
Right click---> Numeric---> Add array element.
Does this solve ur problem
06-17-2011 02:03 AM
Just click on Accept as solution when your problem is solved.
06-17-2011 02:25 AM
Check this: