Azzera filtri
Azzera filtri

Centering graph about 0

1 visualizzazione (ultimi 30 giorni)
imarquez
imarquez il 21 Ago 2015
Modificato: imarquez il 21 Ago 2015
How can I center yt about 0 so that the graph is a mirror image on both sides?
if true
a = 1 % peak value of y(t)
b = 3E-7 % peak time
c = 5E-8 % square root of the variance of the function
f0 = 4E9
sigma = 0.2
t0 = 0
tmax = 2.*b
f = linspace(1E6,1E10,1000)
t = linspace(t0, tmax,1000)
omega = 2.*pi.*f
omega0 = 2.*pi.*f0
yt = a.*exp((-(t-b).^2)./((2.*c).^2)) % equation (1)
fun = @(t) (yt.*exp(-1i.*omega.*t))
q = abs(integral(fun,1E8,1E10, 'ArrayValued',1)) % equation (2)
% code
end
Also I seem to not have the integral being plotted correctly because the value starts at a much lower value then expected. If anyone could give me some advice on that I would appreciate it a lot also. Thank you!

Risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by