LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

equation to a columns of values in text file, please help

Solved!
Go to solution

i have applied an equation to column values of a text file, thr is two columns; for each 10 values i should get an output value, so a total of 5 values + 5 values for each of the two columns with 50 values.

my vi doesnt wrk properly, the values are not coorect, and i get only 5 values instead of 10 (5 for each of the 2 columns with 50 values)

i hv attached my vi, pls help.

0 Kudos
Message 1 of 9
(3,321 Views)

Hi

 

attached is the working code

Regards
Freelance_LV
TestAutomation Consultant
Message 2 of 9
(3,317 Views)

really thanks for the help, but please review this code tht i have attached.

The earlier code is not working here. What should i do.

I have attached both vi and data file.

Download All
0 Kudos
Message 3 of 9
(3,310 Views)

Use Debugging tools available, see whats happening.

Spoiler
You dont need the transpose array before the last for loop!

CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 4 of 9
(3,283 Views)

i made a slight change, deleted the "transpose array" function. Now am geeting the 18 values each for each of the 2 rows, but the values are wrong.[showing NaN].

formula is correct.

I couldnt find where is the fault.

Download All
0 Kudos
Message 5 of 9
(3,273 Views)
Solution
Accepted by topic author Mahisnair

Of course you are getting NaN in there.  You are divided by 0.  Hint:  The first 10 elements going in are all 0.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 9
(3,263 Views)

thnaks for the reply and help, i did it i feel, pls check.

Download All
0 Kudos
Message 7 of 9
(3,256 Views)

That looks like a very logical fix.  In general, be weary about doing equality checks with doubles.  But you should be fine here since we only care about 0.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 9
(3,244 Views)

🙂 thankyou

0 Kudos
Message 9 of 9
(3,225 Views)