How to plot an ultrashort light pulse

29 次查看(过去 30 天)
Does anybody know how to plot an ultrashort light pulse like following? I know its a kind of Gaussian modulated sine pulse. But I really wonder why it has a step-like oscillation.

采纳的回答

SUNCHAO HUANG
SUNCHAO HUANG 2020-2-9
When we plot a sine function or a Gaussian modulated sine function in Matlab, the plotted picture in a Matlab window would be very smooth. In another word, if you magnify the picture, it will still be a smooth curve. However, if we save the picture as a png file, the picture will have step-like oscillations or squiggles (See all figures in this question).
Using fellowing code, a Gaussian intensity modulated sine function is plotted.
close ('all')
omega=1; % frequency
T=2*pi/omega; % period
width=2*T; % Full width at half maximum
tstep=T/1000; % time step
t1=-6*T+tstep:tstep:6*T; % time range -6T to 6T
A1=sin(omega*t1).*exp(-2*log(2)*t1.^2/width.^2); % Gaussian intensity modulated sine pulse
% which different from the Gaussian amplitude modulation by a factor of 2
y1=exp(-2*log(2)*t1.^2/width.^2); % Gaussian intensity envelope
hold on
plot(t1/(2*pi),A1,'r','linewidth',2)
plot(t1/(2*pi),y1,'b','linewidth',2)
box on
set(get(gca,'XLabel'),'FontSize',12);
set(get(gca,'YLabel'),'FontSize',12);
set(get(gca,'Yaxis'),'FontSize',12);
set(gca,'FontSize',12,'LineWidth',2);
set(get(gca,'Xaxis'),'FontSize',12);
xlabel('t/2\pi')
ylabel('E(t)')
legend('E(t)','Envelope')
untitled.png

更多回答(2 个)

Jakob B. Nielsen
Jakob B. Nielsen 2020-2-6
编辑:Jakob B. Nielsen 2020-2-6
A true monochromatic laser beam can never achieve ultrashort pulse lenghts. Ultrashort pulses make use of interference of light with slightly different frequencies but identical phase. So imagine you have an electric field of a given frequency and phase. It will have a cosine shape. Now take a second field of equal amplitude, but a very slightly different frequency, but the same phase. Add those two fields together. What happens? Now add a third, again with a very slightly different frequency but same phase. Where the fields interfere destructively, they will cancel each other out, but where they interfere constructively, they will amplify one another. As a simple demonstration, try to run this bit, where we see one field, sum of 2 fields, sum of 10 fields and sum of 100 fields. Already you see the difference! Note in particular that the y axis goes from -1 to 1 in the first plot to -50 to 100 in the last. Now think of adding thousands and thousands of frequencies together in this way! In the lab where I did my ph.d. we used to illustrate the magnitudes involved by evaluating that our laser beam with an average power of 1 W had a peak intensity equal to the local power plant :)
(Keep in mind the "frequencies" I put in here are extremely different from one another and really rather slow compared to light - this is purely for the sake if illustration ;) )
x=-10:0.01:10;
for i=1:1
y1(:,i)=cos(i*x+0.1);
end
ytot1=sum(y1,2);
subplot(2,2,1)
plot(x,ytot1,'r-');
for i=1:2
y2(:,i)=cos(i*x+0.1);
end
ytot2=sum(y2,2);
subplot(2,2,2)
plot(x,ytot2,'r-');
for i=1:10
y3(:,i)=cos(i*x+0.1);
end
ytot3=sum(y3,2);
subplot(2,2,3)
plot(x,ytot3,'r-');
for i=1:100
y4(:,i)=cos(i*x+0.1);
end
ytot4=sum(y4,2);
subplot(2,2,4)
plot(x,ytot4,'r-');

SUNCHAO HUANG
SUNCHAO HUANG 2020-2-6
Very thanks for your kindly answer. I have tried your code and obtained a set of figures. Although, it is not exactly what I want. I will try the method you have provided.
Thanks again for your answer.

类别

Help CenterFile Exchange 中查找有关 Antennas, Microphones, and Sonar Transducers 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by