From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Thresholding 2D Array

Solved!
Go to solution

I am making a sub VI to threshold samples of data in form of 2D array and sum only out of threshold values

Ananda_Affandi_0-1659930762032.png

Here is mine but I think it was too much of a turnaround so can someone help me to simplify this 

 

0 Kudos
Message 1 of 9
(1,506 Views)

Could you please describe what you're trying to achieve along with a sample dataset and potential real-world application?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 9
(1,489 Views)

Not able to access Attached VI due to LV Version.

 

Pls check Threshold Detector VI for identifying threshold values/indices and add the same for your SUM.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 9
(1,481 Views)

@Ananda_Affandi wrote:

I am making a sub VI to threshold samples of data in form of 2D array and sum only out of threshold values


  1. Yes, your code is way too complicated and probably could fit on a postage stamp. 
  2. First you need to explain exactly what "threshold sample of data" actually means.
  3. Does your current code work correctly?
  4. You have an range detector, but upper and lower limit are zero by default. What are the correct limits? (please make reasonable values default before attaching!)
  5. Do you want to threshold each column separately or is there some relation between the columns that need to be considered?
  6. Taking a sum of zeroes will really never produce any interesting result, right? So why even do it?
  7. I think you need graphs, not charts. Do you know the difference?
0 Kudos
Message 4 of 9
(1,454 Views)
Solution
Accepted by topic author Ananda_Affandi

Maybe something like this?

 

altenbach_0-1659972396439.png

 

 

 

Message 5 of 9
(1,441 Views)

It's actually my friend's project, taking a meauserement from a brain tracking device OpenBCI, he said it's used for something like machine learning so only taking higher or lower signal and summing it then recognizing it as an order to send to another controller and then going to motor or something like that.

0 Kudos
Message 6 of 9
(1,365 Views)

Thank you so much for helping me even I wasn't replying Immediately, there is another thing to edit.

It shouldn't be just a simple sum, it is summing from positive numbers or negative numbers, inside threshold(zero), positive numbers or negative numbers, inside threshold(zero),... and it goes on and on.

 

I am trying on doing that, but I got confused since the number of array component would be unmeasurable and the program should be able to count the size and sum numbers accordingly

 

But your answer is satisfactory, so I think it should close this thread, once again thanks

0 Kudos
Message 7 of 9
(1,358 Views)

@Ananda_Affandi wrote:

It shouldn't be just a simple sum, it is summing from positive numbers or negative numbers, inside threshold(zero), positive numbers or negative numbers, inside threshold(zero),... and it goes on and on.

 

Your descriptions is not clear at all. How is the output supposed to look like (e.g. given the current default data).

 

Do you want to just count the number of items in each range? That would be even simpler. 😄

0 Kudos
Message 8 of 9
(1,352 Views)

I'm sorry I was too tired to re-check my last VI post. 😅

Thanks to you I got better understanding of using these arrays and yes graphs is more relevant in this case. 😁

 

But since you're here, can you help me solve this again, I tried to make it clearer of what I was going to reach by setting default values into desired indicator.

 

I made some changes to your VI to better describe what I am trying to reach.

Ananda_Affandi_0-1660230154337.png

Ananda_Affandi_1-1660230178048.png

 

This is what I am trying to, I appreciate it if you could help, even just giving references, examples or answer from another forum discussion.

0 Kudos
Message 9 of 9
(1,348 Views)