marscru Posted March 12, 2009 Report Share Posted March 12, 2009 hi all, I m pretty new to labview and already searched quite a few forums. My problem is: I got 2 .txt file with numbers - all seperated by tabs - 12 columms and 5 rows each. I want to extract each number columm by columm and row by row to labview to be able to substract both .txt file. Basically I got 2 Tables with number and I want to calc. the difference in each line and row. How can I get the numbers out of my .txt file to do some math with them? thnx for any help! Quote Link to comment
ejensen Posted March 12, 2009 Report Share Posted March 12, 2009 'Read from Spreadsheet File.vi' would be a good place to start. This will allow you to load the text file in to LabVIEW as an array. Quote Link to comment
Antoine Chalons Posted March 12, 2009 Report Share Posted March 12, 2009 QUOTE (marscru @ Mar 11 2009, 01:55 PM) hi all,I m pretty new to labview and already searched quite a few forums. My problem is: I got 2 .txt file with numbers - all seperated by tabs - 12 columms and 5 rows each. I want to extract each number columm by columm and row by row to labview to be able to substract both .txt file. Basically I got 2 Tables with number and I want to calc. the difference in each line and row. How can I get the numbers out of my .txt file to do some math with them? thnx for any help! Hi If your text files really only have this : 1 1 1 . . . 4 5 7 7 5 8 . . . Then this will do the job http://lavag.org/old_files/monthly_03_2009/post-7452-1236777963.png' target="_blank"> Side note, if someone can tell me why the substract doesn't work on 2D array when they have the same dimension sizes Quote Link to comment
TobyD Posted March 12, 2009 Report Share Posted March 12, 2009 QUOTE (Antoine Châlons @ Mar 11 2009, 05:26 AM) http://lavag.org/old_files/monthly_03_2009/post-7452-1236777963.png' target="_blank"> Just curious...why did you use the sequence structure here? Quote Link to comment
Antoine Chalons Posted March 12, 2009 Report Share Posted March 12, 2009 QUOTE (TobyD @ Mar 11 2009, 03:14 PM) Just curious...why did you use the sequence structure here? Because when I tested it on my computer I disconnected the path constants and I wanted to know which file was loaded first. I would have made the dependence with an error wire instead if I could but the 'read spreadsheet file.vi' doesn't have any :thumbdown: Quote Link to comment
TobyD Posted March 12, 2009 Report Share Posted March 12, 2009 QUOTE (Antoine Châlons @ Mar 11 2009, 06:32 AM) Because when I tested it on my computer I disconnected the path constants and I wanted to know which file was loaded first.I would have made the dependence with an error wire instead if I could but the 'read spreadsheet file.vi' doesn't have any :thumbdown: :thumbup: OK Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.