Fourier Analysis for Spatial Frequency

2 vues (au cours des 30 derniers jours)
Anas
Anas le 6 Oct 2013
Dear All, I have a 2D Array of sensors measuring a signal and resulting in a 26x26 Matrix. I need to analyse only a line of the matrix or in other word, a 1x26 Matrix. The measured values should be compared with calculated values and then a fourier analysis should be performed for both and after that, the values should be compared once again. The code is as following:
c1 = csvread('1mm calc.csv', 0, 1, [0,1,308,1]) %%Load Calculated data
x1_1 = csvread('1mm calc.csv', 0, 0, [0,0,308,0]) %%Load IC position for calculated
m1 = csvread('1.csv', 0, 2, [0,2,26,2]) %%Load Measured Data
x1 = csvread('1.csv', 0, 0, [0,0,26,0]) %%Load IC position
%Calculate Fourier & Spatial frequency
%for 1mm
C1= (abs(fft(c1))) %%Perofrm Fourier Transformation for Calculated
v1_1 = 1./x1_1 %%Conver Position to Spatial Doamn forcalculated
M1= (abs(fft(m1)))/(1.457481481481482) %%Perofrm Fourier Transformation for Measured
v1 = 1./x1 %%Conver Position to Spatial Doamn
subplot(2,1,1); plot(x1_1,c1,'m--',x1,m1,'ok','LineWidth',2)
xlabel('Position [mm]');
ylabel('rel. Reading');
hleg1 = legend('1mm','Measured');
subplot(2,1,2);plot(v1_1,C1,'m--',v1,M1,'ok','LineWidth',2)
xlabel('Spatial Frequency [1/mm]');
ylabel('rel. Absolute Val. (FFT)');
hleg1 = legend('1mm','Measured');
what i am getting is :
but what i need to get is similar to this:
and the question is, what am i doing wrong? other than shifting the negative part of the fourier analysis to the positive part and normalizing the values to 1. i might also need to pickup specific values to make the analysis easier.
So to the sum up the questions again: 1- Where am i going wrong in the Fourier command part? 2-when the code is loading "c1" & "x1_1", they are 309 values. how can i read the values with a sampling step of ten?
Thanks in advance

Réponses (0)

Catégories

En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by