LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate an array of random numbers that relate to an output wave that falls within a certain frequency range?

I have been creating random numbers that I'm using within a system, the system is working fine, but now I have realised that the random numbers must be outputted to speakers in such a way as to filter out all but a low frequency range.

I was thinking about generating a dither signal with a bandpass filter, but could not get it to give me out a full array of 250 values which I could then manipulate.

The sampling frequency of the output is 200Hz and the 250 data points must fall within the 0-100Hz range.

Another course of action I am considering is to use an FFT and an inverse FFT to get the data that I'm looking for, but I'm fair
ly inexperienced with using labVIEW and can't quite get it to work.

Thanks for the help,
Hank.
0 Kudos
Message 1 of 2
(2,419 Views)
As you may already know, in the Functions palette/Analysis VIs/Filters VIs are VIs for filtering. There are also some examples for using these filters under Examples/Analysis/fltrxmpl. You may find some of these are related to your situation, especially for filtering out the higher values.

An option is to simply output the random values to a Comparison/"less than or equal" function, where only values <= to 100 would be sent to an array which is in a For loop. Use the iteration counter of the For loop to count up to 250, at which time you would pass the whole array to your next node. This would let you have 250 values between 0 and 100 for your final array.
Good luck.
0 Kudos
Message 2 of 2
(2,419 Views)