fourier transform of smart-phone accelerometer in matlab I'm new to matlab. I want to process my smart-phone accelerometer data in matlab. I know Matlab let's you connect your phone via USB cable to see accelerometer data in realtime. But according to some reasons I don't want to use this method. Instead I've developed an application that saves accelerometer data. I want this application to produce a ".m" file and use this file to represent x-y-z signals. The problem is that the accelerometer data rate is not constant. for example: "data-1" corresponds to time "0.1", "data-2" corresponds to time "0.2", and "data-3" corresponds to time "0.8". You can see the time interval can change. I need to get fourier transform of these signals, so I can not use the simple matlab vector to represent them. How can I represent these signals? How can I get the correct fourier transform of these signals?
Two methods occur to me.


Perform a non-uniform DFT. You can use Google to find MATLAB implementations of it, or try to write one on your own. This file seems to be legit, although I haven't tried it myself.
If you have the Signal Processing Toolbox, then you can use the resample() function to interpolate your non-uniformly sampled vector linearly onto a vector of uniformly spaced instants, and then perform the usual DFT on the latter.