syiling Posted May 22, 2006 Report Share Posted May 22, 2006 hi, I am a beginner in labview. asnd currently doing exercises about table. I would like to know how to get the number of row to be display at the output after a data is matched from a table. for example, the table is as below: Column1 Column 2 Column 3 Column 4 Column 5 Name: Gender: Age: ID number: Hobbies: Row 1 Sara Female 18 12-23-45 swimming Row 2 John Male 20 23-45-78 reading Row 3 Katy Female 55 10-25-99 Rock climbing Row 4 Alex Male 7 99-27-32 cycling from the table above, if I want to find a match for the name I key- in, the output should show me the row number that is match with the name I typed. I would like to know how to make this happen? from the labview, i tried out "match first string" icon to match the name i typed with this table, but I cannot get the number of row of that name I typed. lets say, when i type in the name John, the output would be able to show the number = 2, which is the row number. besides that the info of John would be display also. I would like to know how to make this happen? I had tried, but still cannot get it correct I had attached a vi file that I had done but imcomplete, because i cannot get the row number correctly. i hope that there is some one would help me with it by providing or modifying the vi file that is had attech. thanks a lot for the help. Download File:post-5026-1148278496.vi Quote Link to comment
crelf Posted May 22, 2006 Report Share Posted May 22, 2006 i cannot get the row number correctly. This is seriously in the wrong forum - you've posted it to "Remote Control, Monitoring and the Internet", and it looks more like homework to me... Anyway - here's a suggestion: try converting your input string to an array ("Spreadsheet string to array") and then searching the resulting 2 dimensional array... Quote Link to comment
syiling Posted May 23, 2006 Author Report Share Posted May 23, 2006 This is seriously in the wrong forum - you've posted it to "Remote Control, Monitoring and the Internet", and it looks more like homework to me...Anyway - here's a suggestion: try converting your input string to an array ("Spreadsheet string to array") and then searching the resulting 2 dimensional array... thanks for the tips. but my data is already in 2 dimensional array. I just want to get the row number with matched data. I still couldn't get it.could you help me with it? I would really appreciate it. the example is like this: row 1: Sara row2: John row3: Alex row4: Danny lets say I type in Alex, then the result should be able to show me the row number, which is 3. I had tried out the "index array", but still cannot get the result. I really hope that you could help me with it. I would be very grateful. Quote Link to comment
bbean Posted May 23, 2006 Report Share Posted May 23, 2006 thanks for the tips.but my data is already in 2 dimensional array. I just want to get the row number with matched data. I still couldn't get it.could you help me with it? I would really appreciate it. the example is like this: row 1: Sara row2: John row3: Alex row4: Danny lets say I type in Alex, then the result should be able to show me the row number, which is 3. I had tried out the "index array", but still cannot get the result. I really hope that you could help me with it. I would be very grateful. See attachments. Download File:post-549-1148345218.vi Quote Link to comment
crelf Posted May 23, 2006 Report Share Posted May 23, 2006 I had tried out the "index array", but still cannot get the result. Index array will select an array element - you want to seach an array. Check out the other primatives on the palette and the LabVIEW help. See attachments. Whoa there - the general method of assisting Homework Hustlers is to guide them to the answer with the hustler showing their progress at each step, not just do the assignment for them. Quote Link to comment
bbean Posted May 23, 2006 Report Share Posted May 23, 2006 Index array will select an array element - you want to seach an array. Check out the other primatives on the palette and the LabVIEW help.Whoa there - the general method of assisting Homework Hustlers is to guide them to the answer with the hustler showing their progress at each step, not just do the assignment for them. You're right, but sometimes its less annoying to give them the answer, especially when a language barrier is in the way. Won't let it happen again. B Quote Link to comment
syiling Posted May 23, 2006 Author Report Share Posted May 23, 2006 thanks for the tips.but my data is already in 2 dimensional array. I just want to get the row number with matched data. I still couldn't get it.could you help me with it? I would really appreciate it. the example is like this: row 1: Sara row2: John row3: Alex row4: Danny lets say I type in Alex, then the result should be able to show me the row number, which is 3. I had tried out the "index array", but still cannot get the result. I really hope that you could help me with it. I would be very grateful. really thanks a lot for the help..it really help a lot. Quote Link to comment
crelf Posted May 23, 2006 Report Share Posted May 23, 2006 You're right, but sometimes its less annoying to give them the answer, especially when a language barrier is in the way. Won't let it happen again. No worries bbean. Oh, and by the way, welcome to LAVA! Quote Link to comment
Michael Aivaliotis Posted May 23, 2006 Report Share Posted May 23, 2006 Whoa there - the general method of assisting Homework Hustlers is to guide them to the answer with the hustler showing their progress at each step, not just do the assignment for them.crelf, you're such a meanie . Quote Link to comment
crelf Posted May 24, 2006 Report Share Posted May 24, 2006 crelf, you're such a meanie . It's true - here's a recent photo of me: :!: Whatever you do, don't click on the photo - they're all lies! 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.