sbev001 Posted June 2, 2009 Report Share Posted June 2, 2009 Hi, sorry I know that this question is probably very basic but I am new to LabVIEW and still figuring it all out. How would I go about building an algorithm tha will take the values from a 2-D array and integrate them (I need to integrate current with respect to time). Should I use a for loop or while loop? Quote Link to comment
bmoyer Posted June 2, 2009 Report Share Posted June 2, 2009 QUOTE (sbev001 @ Jun 1 2009, 10:26 AM) Hi, sorry I know that this question is probably very basic but I am new to LabVIEW and still figuring it all out. How would I go about building an algorithm tha will take the values from a 2-D array and integrate them (I need to integrate current with respect to time). Should I use a for loop or while loop? My guess would be a for loop, unless you want to stop at a particular value or something special like that. You need to know the format of the 2d array as well. If you put a 2d array into a for loop it will automatically index on each row. If you have a column for time and a column for value it you may not even need a for loop at all. Look at the Index array function to get all the data from a particular column (assuming you have the data organized like this). There's a palette for doing integration in the Mathematics palette you can look at (but you may not have access to this palette depending on the type of LabVIEW package you have. Spend some time and poke around. Ctrl-H gives a pop-up help and usually more help if you click on the link in the pop-up help. Bruce Quote Link to comment
Minh Pham Posted June 4, 2009 Report Share Posted June 4, 2009 QUOTE (sbev001 @ Jun 2 2009, 12:26 AM) Hi, sorry I know that this question is probably very basic but I am new to LabVIEW and still figuring it all out. How would I go about building an algorithm tha will take the values from a 2-D array and integrate them (I need to integrate current with respect to time). Should I use a for loop or while loop? this is a simple example on how you can do an integrate from values within a 2d array, assume that 1st row is timming data, 2nd row is data. the dt is constant in this case so i dont need a loop structure. Quote Link to comment
sbev001 Posted June 5, 2009 Author Report Share Posted June 5, 2009 thanks! that was really helpful : ) Quote Link to comment
Minh Pham Posted June 6, 2009 Report Share Posted June 6, 2009 QUOTE (sbev001 @ Jun 4 2009, 11:50 PM) thanks! that was really helpful : ) u r welcome 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.