LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining if data is inside a boundary

Brian,

 

 I do not have an answer to your question, but I noticed something else which you may wish to consider. The use of Build Array inside the for loops which generate the XY Graphs cause frequent memory reallocations and slow down the program dramatically.  I replaced those with Initialized Arrays and Replace Array Subset and then split the resulting arrays to get the pieces with replaced data after the for loop.  The time to execute the program dropped from about 20 minutes to a few seconds.  You should do something similar in the Duplicate Mask N times loop, although because N is small, it is not so much of an issue there.

 

I am including an image of the changes I made.  The two for loops are identical. The upper one shows the True case while the lower one shows the False case.  This could be made into a subVI since it is used more than once.

 

Lynn

 

Replace Array.png

0 Kudos
Message 11 of 13
(582 Views)

Thanks for that memory suggestion. After things were accurate, I was going to tackle the memory issues.

0 Kudos
Message 12 of 13
(569 Views)

I won't vouch for absolute mathematical certainty, but as long as the graph is reasonably large, my old friend the 1-bit pixmap can be used to find enclosed points.  I have attached a couple of VIs, not fully cleaned up, but functional.  If I cared about the points near the origin I would create the picture from the individual masks (note the regions are connected), does not matter with the points you show as typical data.

 

PolarRegionNew.PNG

 

Note: I only show the enclosed points,  you can change the format of the points if you want to show multiple plots.

 

 

Download All
0 Kudos
Message 13 of 13
(557 Views)