Calculating the time period for multiple signals in matlab

256 views Asked by At

I'm currently doing a fluid simulation. The flow is calculated in discretized steps of 0.0625 s. I think the flow is periodic in all points because it is periodic in some points.

I also calculated the Fourier Transform of this. There was a minor peak at 0.5356 Hz (and some more at higher frequencies). So the period is 1.8671 s. This was consistent with the corresponding signal.

But now I want to prove that this counts for all the nodes of my mesh (around 7000 nodes). Is there a fast way for doing this in MATLAB?

Thanks

(I would have loved to add pictures but I couldn't)

1

There are 1 answers

7
Max On

Yes.

If the input X is a matrix, Y = fft(X) returns the Fourier transform of each column of the matrix. This is considerably faster than looping through each column and calling fft(x) one at a time.

You will need to reshape your input data into a 2-D matrix, where the row dimension is time, for the analysis.