11-07-2023 04:42 AM
Hello!
I try to understand a program run. This program make difference between clap or knock. But I don't understand Split 1D Array Index input data, it works only if I set up 500. What does it make exactly?
I can read the help funciton. (Divides array at index and returns the two portions with the element of index at the beginning of second subarray.) But I don't understand.
How is it work? And what does it portion?
I attach a picture below.
Thank you your answear!
Solved! Go to Solution.
11-07-2023 04:59 AM
Hi laszlo,
@laszlobango wrote:
I can read the help funciton. (Divides array at index and returns the two portions with the element of index at the beginning of second subarray.) But I don't understand.
SplitArray doesn't "divide", it splits an array!
Example:
Splitting an array consisting of several chars like "ABCDefgh" (each char an element) with an index of 4 will give outputs of "ABCD" and "efgh". You could easily test this on your own with a simple test VI with only a SplitArray function in its block diagram…
11-07-2023 05:13 AM
Thank you the answer!
But I don't understand why it works well If I set up 500? Whats the problem with 100 or 400 or 1000? ( I'm full beginner)
I tried my program, and it shows good results with this set up only. If it's less or more than it coulden't make difference between clap or knock.
And it is what i don't understand.
11-07-2023 05:20 AM
You are sampling a sound at regular time intervals, so the index could be interpreted as the time elapsed after the start of acquisition - actually it's 500 times the acquisition period.
It seems that "time" 100 is too early and "time" 1000 is too late. The LabVIEW function in itself works in any case. It's the nature of the signal that apparently makes 500 the right choice.
11-07-2023 05:28 AM
Thank you!
It's okay for me.
And every situation i should make tests before find the good index? Or do you know better way?
11-07-2023 05:35 AM
Of course you must consider every different case separately. You should be guided by the consideration of the signal to be analyzed, i.e. the physics of the phenomenon when possible. Other parameters can be relevant: for example, if you double the acquisition frequency the right choice would be 1000.