LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure no false output

Hey guys,

 

To start off, I am very new at Labview.  I have posted about this project before but my professor has changed the assignment slightly.

 

- Generate a random set of N points (x,y) between 0 and 100

- Find the closest point to each point

- Calculate the number of points with a closest point of less than D

- Graph the points with the points with a closest point of less than D clearly marked

 

So far I have manged to get everything done except for the last part, at least completley.  My approach was to create a case structure with < D as the requirement, if true build array if false I wanted it to do nothing, but I can't seem to do that.  I tried using a number ourside of the array size but that doesn't seem to work either.  Then I tried using a a shift register to do the same thing but had the same problem.  I could use some help if at all possible.  I have posted both codes below.  1_9 is the case structure alone and 1_10 is the shift register approach.

Download All
0 Kudos
Message 1 of 3
(3,428 Views)

Not bad- monor tweaks set off with some color attached.

 

NOTE use BD comments. Watch your data types (point closest should be an Integer type not a double) use increment rather than adding 1. kill the iteration indicators you are outo indexing off of an array generated with the Number of Points(N) control- there is no need to write N number of times to each indicator.  why you CHOSE to cross the wires into and out of the fourth loop baffles the mindSmiley Wink

 

 EDIT: the SR should be initialized with an EMPTY array I just noticed that it has 1 element. that is a bug


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(3,409 Views)

Thanks for all the help,  I got it working

0 Kudos
Message 3 of 3
(3,399 Views)