Centering graph about 0

1 次查看(过去 30 天)
imarquez
imarquez 2015-8-21
编辑: imarquez 2015-8-21
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!

回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by