Plotting a rectangular pulse with a exponential under the rectangular pulse
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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!
0 Kommentare
Antworten (1)
Image Analyst
am 11 Feb. 2017
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;
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spectral Measurements finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!