Plotting a rectangular pulse with a exponential under the rectangular pulse
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Image Analyst
le 11 Fév 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 commentaires
Voir également
Catégories
En savoir plus sur Spectral Measurements dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!