New Reply

Plot spectral phase in Mtlab

 
Share Thread Thread Tools
Mar12-12, 10:54 AM   #1
 

Plot spectral phase in Mtlab


Hi everyone,

I have this Matlab code :

function PH = testing
close all;
x = [0:1e-3:10-1e-3];
ph = -(x-5).^2;
y = exp(-(x-5).^2./(0.2^2)).*exp(i*2*pi*ph);

Y = fft(y);
Y = fftshift(Y);
PH = angle(Y);
X = (x(2) - x(1))^-1*linspace(0,1,length(x));

figure
plot(x,ph);
figure
plot(X,PH);
end

I build a gaussian curve with quadratic phase and Fourier Transform it. I expect to have a quadratic phase (with opposite sign) in the spectral domain, but I cannot have it correctly. The plot of PH shows jumps between adjacent points. Even using unwrap.m I cannot plot it well.

Thanks in advance for any help
 
PhysOrg.com
PhysOrg
engineering news on PhysOrg.com

>> Researchers use light projector and single-pixel detectors to create 3-D images
>> GPS solution provides 3-minute tsunami alerts
>> Single-pixel power: Scientists make 3-D images without a camera
New Reply

Tags
fft, fourier transform, spectral phase, unwrap
Thread Tools


Similar Threads for: Plot spectral phase in Mtlab
Thread Forum Replies
Bode plot: positive phase Engineering, Comp Sci, & Technology Homework 3
Rasterized density plot + countour plot in Mathematica (to solve EPS issues) Math & Science Software 0
Bode Plot Question(Phase and Gain Margin) Engineering, Comp Sci, & Technology Homework 2
Using nullclines to plot phase portraits Differential Equations 0
Bode Phase plot of a second order system Electrical Engineering 4