LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting a Function from a array/graph

The program I'm currently working on reads in a .wav file, and puts the data points into an array. The user creates the .wav file in a seperate program, indicating the number of data points desired...etc. There is only one set of data points in the array, the y values (in cartesian notation). The x values simply range from 0 to the number of data points specified by the user.
What I'd like to able to do, is be able to read the function back from these data points. For example, if a sine wave is stored in the .wav file, can labview somehow detect that it is a sine wave? Or perhaps compare the array with an array of sine values and ouput a boolean variable saying "yes, they match" or "no they are different". Ha
ving the ability to do this would greatly help my program.
The problem with AWC (the program that generates the .wav file) is that the points needs to be edited a bit for different functions. For example, if the user chooses a sine wave in AWC, I need to divide all of these points by 2. If the user chooses an exponential function, I need to add 2 to all these numbers. However, I have no means to distinuguish between a sine wave and an exponential wave.
If anyone has had a similar problem, or has a solution, feel free to email me at jdalton@nal.com or reply to this message. Thanks!
0 Kudos
Message 1 of 2
(2,763 Views)
Hi,
first of all you have to demodulate a wave by using peak detection,
then use a logarithm function after that you can see a vector
then calculate an angle of it. If an angle equal a zero then add by 2
else
divide by ...
I'll send an example to you directly.
Mike

jdaltonnal wrote:

> The program I'm currently working on reads in a .wav file, and puts
> the data points into an array. The user creates the .wav file in a
> seperate program, indicating the number of data points desired...etc.
> There is only one set of data points in the array, the y values (in
> cartesian notation). The x values simply range from 0 to the number
> of data points specified by the user.
> What I'd like to able to do, is be able to read the function back from
> these data points.
For example, if a sine wave is stored in the .wav
> file, can labview somehow detect that it is a sine wave? Or perhaps
> compare the array with an array of sine values and ouput a boolean
> variable saying "yes, they match" or "no they are different". Having
> the ability to do this would greatly help my program.
> The problem with AWC (the program that generates the .wav file) is
> that the points needs to be edited a bit for different functions. For
> example, if the user chooses a sine wave in AWC, I need to divide all
> of these points by 2. If the user chooses an exponential function, I
> need to add 2 to all these numbers. However, I have no means to
> distinuguish between a sine wave and an exponential wave.
> If anyone has had a similar problem, or has a solution, feel free to
> email me at jdalton@nal.com or reply to this message. Thanks!
0 Kudos
Message 2 of 2
(2,761 Views)