dim refers to which index position. so for 1000x10 data, data(I,J) the I corresponds to the position in the first dimension, dim 1, the J corresponds to the position in the second dimension, dim 2. When dimension 1 (row number) changes and the rest stays the same for any given vector, then the operation is "along" dimension 1. When dimension 2 (column number) changes and the rest stays the same for any given vector, then the operation is "along" dimension 2. So to operate "along" rows, as in a whole series of fft(data(I,:)) then that is "along" dimension 2, so fft(data,2)
FFT of 10 rows of data points
1 次查看(过去 30 天)
显示 更早的评论
I have a dataset which forms a matrix of [1000*10]. I want to perform fft on this dataset such that it be done row-wise. Different rows of the matrix correspond to data originated from different processes. So, the result of fft must also be a matrix of same dimensions. What is the syntax for performing this fft so that I can take out first row of the result and do further computation and similarly for other rows.
I came across this, y= fft(X,[],dim) for doing row wise fft but don't understand what is the meaning of dim here. Is it the dimension, as in 10 in my case? What square brackets mean?
My code:
w = 512; %window size
yf = fft(Data(x:(x+w)), [], 10);
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!