Plotting a rectangular pulse with a exponential under the rectangular pulse

2 次查看(过去 30 天)
Hello,
I am trying to create a MATLAB Simulation that uses this equation:
s(t) = A*rect(t/tau)*exp(j*w*t); where w = 2*pi*f and f = 3 GHz
Then I am looking to I am looking to create another MATLAB Simulation using this equation:
s(t)= [rect((t-to)/tau)+ rect((t+to)/tau)]*exp(j*w*t)
but if possible I need the second equation to have the same amount of energy as the first equation.
Therefore, the second equation will be skinnier, but have a higher amplitude to compensate for the energy lost.
Any help would be greatly appreciated.
Thank you!

回答(1 个)

Image Analyst
Image Analyst 2017-2-11
How about starting like this:
f = 3 % GHz
w = 2*pi*f
tau = 9; % Whatever...
t = 1 : 500; % Whatever...
A = 40; % Whatever...
s1 = A*rect(t/tau)*exp(j*w*t);
plot(t, s1, 'b-');
grid on;
s2 = [rect((t-to)/tau)+ rect((t+to)/tau)]*exp(j*w*t)
s1Area = sum(.....
s2Area = sum(.....
s1 = s1 / s1Area;
s2 = s2 / s2Area;

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by