adding dimension to 2d array

This is a discussion on adding dimension to 2d array within the labview forums in Programming Languages category; It's not a matter of it being a "bad idea". It's a perfectly fine idea, if the indexing of the array matches your card numbers. With a 3D array the first index refers to the page, and the indexing starts at 0. You can't change this, and you can't skip index numbers. Thus, if you collect each 2D array as "pages", then "page0" would correspond to the first card's data, "page1" corresponds to the second card's data, and so on. The index number may not correspond to your card number. If they don't, then a 1D array of clusters may ...

Go Back   Application Development Forum > Programming Languages > labview

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #11  
Old 07-09-2008, 10:40 AM
smercurio_fc
Guest
 
Default Re: adding dimension to 2d array

It's not a matter of it being a "bad idea". It's a perfectly fine idea, if the indexing of the array matches your card numbers. With a 3D array the first index refers to the page, and the indexing starts at 0. You can't change this, and you can't skip index numbers. Thus, if you collect each 2D array as "pages", then "page0" would correspond to the first card's data, "page1" corresponds to the second card's data, and so on. The index number may not correspond to your card number. If they don't, then a 1D array of clusters may be of more benefit to you. Each element of this cluster refers to a card, and the 1D array of clusters is the array of cards. The cluster would consist of 2 elements: a numeric that refers to the card number, and a 2D array that corresponds to the data:


Example_VI_FP.png:
http://forums.ni.com/attachments/ni/...mple_VI_FP.png
Reply With Quote
  #12  
Old 07-09-2008, 10:40 AM
markfranklin
Guest
 
Default Re: adding dimension to 2d array

Thank you for the valued insight guys. It is not working 3D as wished using an additional FOR loop to append the completed 2D array with the card number.The BUILD ARRAY, SIZE ARRAY, BUILD ARRAY, INSERT INTO ARRAY, as well as a shift register on the outside FOR loop to append the 3D array with the data for each card.
Reply With Quote
  #13  
Old 07-09-2008, 10:40 AM
smercurio_fc
Guest
 
Default Re: adding dimension to 2d array

I'm not sure what you're doing, but a for-loop can easily build a 3D array:


Example_VI.png:
http://forums.ni.com/attachments/ni/...Example_VI.png
Reply With Quote
  #14  
Old 07-09-2008, 10:40 AM
markfranklin
Guest
 
Default Re: adding dimension to 2d array

Typo. It is NOW working.Thanks.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:31 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.