0

I'm writing a program that has, as one facet, a wave filtration/resolution routine. The more data I collect, the bigger the files stored to the device get. I'm collecting data at discrete time steps, and in the interest of accuracy I'm doing this pretty frequently. However, I noticed that the overall wave form tends to be wide enough that I could be collecting data at about half the rate I am and still be able to draw an accurate-enough-for-my-purposes waveform over the data.

So the question: is there a way to, from this data, create a continuous mathematic description of the curve? I haven't been able to find anything. My data is float inside of NSNumbers contained by an NSArray.

The two things I would like to be able to do are get intersections points for a threshold and find local maximums. The ability to do either one of these would be sufficient.

-EDIT-

If anyone knows a good objective-c FFT method for 1-dimensional real arrays I would love to hear it.

Dustin
  • 6,783
  • 4
  • 36
  • 53

1 Answers1

1

Apple includes an FFT in the Accelerate framework.

Using Fourier Transforms

Example: FFT Sample

Also: Using the Apple FFT and Accelerate Framework

Community
  • 1
  • 1
rob mayoff
  • 375,296
  • 67
  • 796
  • 848
  • I saw this one, but I haven't been able to get it to work for for 1-D real arrays. Is there an example anywhere? I'm coming from matlab where I could do fft(array) and be done. – Dustin Jul 16 '12 at 18:04
  • Thanks, the apple docs for the accelerate framework were completely incomprehensible. – Dustin Jul 16 '12 at 18:11