Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

use FFT in matlab and get phase plot

Status
Not open for further replies.

Passband Modulation

Newbie level 4
Newbie level 4
Joined
Mar 24, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,340
i have some polymers characterized by transmission terahertz time domain spectroscopy (THz-TDS).

ive now the time domain data in Excel, with column A being (Delay ps), column B (Reference), column C (Amplitube nA) as follows.

**broken link removed**

i would like to have "FFT phase of column C" minus "FFT phase of column B", and then plot the phase (after deduction) as a function of frequency.

i am told this could be done by adding

plot(freq,angle(fft(X:),3)))-angle(fft(X:),2))))

after

[X,TXT,RAW] = xlsread('yourfile.xls');
xdft = fft(X:),2)); xdft = fft(X:),2));
% sampling interval -- assuming equal sampling
DT = X(2,1)-X(1,1);
% sampling frequency
Fs = 1/DT;
DF = Fs/size(X,1);
freq = 0:DF:Fs/2;
xdft = xdft(1:length(xdft)/2+1);
phi = angle(xdft);

anyway it does not work

the command window shows

??? Error using ==> plot Vectors must be the same lengths.

Error in ==> Untitled at 12 plot(freq,angle(fft(X:),3)))-angle(fft(X:),2))))
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top