LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Different way to not use constant in an array

Hi! I know this question is stupid, but I am confused. I don't want to use the constants (1.358 and 1.3606) that I put in the vi so even if I change the file to be read, it will automatically choose the time. I tried to use the max min and also split the array but it is still not what I want 😞. Is there an easy way to do it? 

Download All
0 Kudos
Message 1 of 3
(547 Views)

You are doing something that is "legal", but "unusual", and might run afoul of a very common implementation of multi-dimensional Arrays that gets "confused" when you attempt to empty a 2D array by deleting rows one-at-a-time.

 

The easiest way to fix this is after you do the delete, check the Array Size (multiplying rows x columns x pages x ...).  If it is zero, replace the "odd-shaped" array with a null array of the proper (0, 0, 0, ..) dimensionality, and get on with your life.  NI could build this into their code, but (a) this isn't an "error", just an "I'm surprised to see this", (b) it would complicate the compiler, (c) "If it ain't broke, don't fix it" (and add steps and extra time to the compiler and code execution).

 

Bob Schor

Message 2 of 3
(482 Views)

Ohh, I see. I will try and do your suggestions first and thank you for your reply.

0 Kudos
Message 3 of 3
(453 Views)