02-21-2006 10:00 AM
02-21-2006 10:25 AM
If all the data in the file are numeric values you can use the Read From Spreedsheet File VI to get the 2-D array of data. Then use the index array function and index out column 1 and 2. Then multiple the arrays together, and then there is a Sum array elements VI that should finish it off.
See the attached image
02-21-2006 10:28 AM
It would depend on your file format. Lets assume is spreadsheet compatible format such as comma or tab delimited.
1. Use the Read From Spreadsheet.vi. This will give you an 2D array of numbers.
2. Use Index Array to extract the second and third colums which would be column index 1 and 2 if you don't want the first column (index 0).
3 The array data from your second and third columns will be 1D arrays which can be muliplied together using Multiply function.
4. The last think to do is to feed the mulitplied 1D array from step four into Add Array Elements function.
5. Create an indicator from the output of Add Array Elements and that should be you.
Have a go and see how you get on.
David