05-10-2011 05:44 AM
i have a rather silly question...
but this small thing is being used in a big code and creating problems.....
I have a 1D array and by using the size function i am finding its size.
But when i delete some elements from the array, the size function still shows the original size.... and this spoils the functioning of the entire code....
So, I can only add elements and increase the size but can never delete elements and reduce the size.... how to go about it???? thanx.....
05-10-2011 06:27 AM
Hi,
I suppose you are talking about 2-D array. I think in labVIEW a 2-D array will always be square. That means even if the number of elements in each row or column varies, the size will be decided according to the row and column with maximum number of elements. But when a 1-D array is considered , if you delete an element the size also is reduced by one.
Even I am interested to know if there are any alternatives.:)
Regards,
Nitzz
(Kudos are always Welcome, Mark as a solution if it is the One;))
05-10-2011 06:43 AM
i am talking bout 1D array only....
but after deleting the element.... the size is not decreasing..... r u sure its decreasing for u??
05-10-2011 06:58 AM
You should post the code you are using.
It certainly works correctly for me in v 8.5.
Ian
05-10-2011 06:59 AM
Hi,
This is how i tried. May be sharing your code will help me understand better your problem.
Regards,
Nitzz
(Kudos are always Welcome, Mark as a solution if it is the One;))
05-10-2011 08:13 AM
u mean i have to use the delete from aray function each time???
cant i just delete the last element from the control panel.... and thus reduce the size by one??
05-10-2011 08:44 AM - edited 05-10-2011 08:47 AM
it works fine..
05-10-2011 09:13 AM
right click the element..... data operations>> delete element.....
that seems to be the way to remove the element from the control panel..... 😛 😄
08-03-2012 05:56 PM
Thank you, Preetisar. I spent almost an hour trying to find the answer to this very simple question. It is such an elementary operation but in no way obvious.