필터 지우기
필터 지우기

Fast Fourier Transform on multiple .csv files in one plot

조회 수: 5 (최근 30일)
Robert Evans
Robert Evans 2016년 4월 10일
댓글: Star Strider 2016년 4월 11일
Hello, I have 26 CSV files with 1001 time domain data points in each.I'm trying to perform an FFT on the data to view the frequency spectrum.
I have been able create an FFT of each file individually, but was hoping to do an FFT on all of the files in one go so that they all show up on the same plot.
I don't know how I would go about doing this, so I was hoping someone might be able to help me with this problem.
Best Regards
Robert

채택된 답변

Star Strider
Star Strider 2016년 4월 10일
I would read them all in, each as its own cell array element (one for each file), then, since they are all the same lengths, concatenate them (most likely horizontally since I suspect they’re column vectors), using cell2mat or simple cell addressing to convert them from cells to a double matrix, then save all of them as the double matrix in a .mat file. For helpful details, see FAQ: How can I process a sequence of files?
Then load the .mat file and do the fft. It operates on columns by default. The code between the top two plot figures in this documentation for fft is everyting you need to know about analysing and plotting them.
  댓글 수: 6
Robert Evans
Robert Evans 2016년 4월 11일
편집: Robert Evans 2016년 4월 11일
Great, thanks very much for your help.
Star Strider
Star Strider 2016년 4월 11일
My pleasure.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by