Plotting of FRF curves

I want to plot FRF vs Frequency graph.I have a matrix 'a' of acceleration & a force matrix 'f' both of 30000X1 size, collected in 3secs with a time step of 0.0001 sec.I am using the following steps to plot FRF. a=[ ]; f=[ ]; ffa=fft(a); fff = fft(f); frf, H=ffa./fff; aH =abs(H); I want to plot FRF vs Frequency graph using log(aH) on Y-axis. Pl tell me how to specify x-axis?

1 Comment

Please format your code:
http://www.mathworks.com/matlabcentral/about/answers/

Sign in to comment.

Answers (2)

bym
bym on 27 Jun 2011

0 votes

1 Comment

Dear Sir,
I had only asked this question in that link also.Thank u very much for ur answer.But I have tried many ways of setting x- axis but not getting correctly.I request u to kindly provide me the exact answer.
Prof.S L Gombi

Sign in to comment.

bym
bym on 29 Jun 2011
Frequency resolution is sampling frequency divided by FFT points. So for a one sided spectrum, it is (directly from the documentation)
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
you can then plot as
semilogy(f,aH)
or
loglog(f,aH)

3 Comments

Dear Sir, Thank u once again.
Kindly confirm my data wether is it correct wrt your answer or not.
For the case I have mentioned above:
L = 30 000, Fs = 10 000, What is 'y'?
Is y = accelration matrix 'a'(size:30000X1) or force matrix 'f'(size:30000X1) or the FRF matrix 'H'(size:30000X1),absolute value of H i.e 'aH'matrix(size:30000X1) or is it only a number 30000?
Actually 2^15 = 32,768 IS L = 15 ?. I am confused .Pl clarify my doubt
Prof.Shrinivas Gombi
bym
bym on 29 Jun 2011
L = 30000; y = aH; NFFT = 32768; Fs = 10000
Dear SIr,
Kindly check my steps:
a = [30000X1 readings];
ffa = fft(a);
F =[30000X1 readings];
fff = fft(F);
H = ffa./fff;
aH = abs(H);
L = 30000;
NFFT = 32768;
Fs = 10000;
y = aH;
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
semilogy(f,aH)
After the Execution I am getting the following comment
??? Error using ==> semilogy
Vectors must be the same lengths.
Kindly let me know where is the mistake and how to correct it.As I required to submit my PhD thesis at the earliest, pl help me in solving this problem.Waiting for your reply
Prof> Shrinivas Gombi

Sign in to comment.

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Asked:

on 27 Jun 2011

Community Treasure Hunt

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

Start Hunting!