So here is my code:
if trueformat longa = 1 b = 3*10^-7 c = 5*10^-8 f0 = 4*10^9 sigma = 0.2 t0 = 0 tmax = 2*b t = 6*10^-9omega = 2*pi*fomega0 = 2*pi*f0yt = a*exp((-(t-b)^2)/((2*c)^2))G = -2*pi*f*(pi*c^2*f + sqrt(-1)*b)D = (((b-(sqrt(-1))*2*pi*c^2*f-t0)/(sqrt(2)*c)))E = (((b-(sqrt(-1))*2*pi*c^2*f-tmax)/(sqrt(2)*c)))Ff = sqrt(pi/2)*a*c*exp(G)*((-sqrt(-1)*(erfi(-sqrt(-1)*D)))-((-sqrt(-1)*(erfi(-sqrt(-1)*E)))))Zf = ((1-(sigma/2))*Ff) + (sqrt(-1)*sqrt(pi/2)*((a*c*sigma)/4)*exp(-((2*pi*f+omega0)*(c^2*(2*pi*f+omega0)+2*sqrt(-1)*b))))*(-exp(4*pi*c^2*f*omega0+2*sqrt(-1)*b*omega0)*((-sqrt(-1)*erfi(((tmax-b+sqrt(-1)*c^2)*(2*pi*f-omega0))/(sqrt(2)*c)))-(-sqrt(-1)*erfi(((t0-b+sqrt(-1)*c^2)*(2*pi*f-omega0))/(sqrt(2)*c))))+(-sqrt(-1)*(erfi(((tmax-b+sqrt(-1)*c^2)*(2*pi*f+omega0))/(sqrt(-1)*c))))-(-sqrt(-1)*erfi(((t0-b+sqrt(-1)*c^2)*(2*pi*f+omega0))/(sqrt(-1)*c)))) % code
end
I have tried making:
if truet = timeseries(t) % and also tried
t = 1:6*10^-7 % and then graphing
plot(t,yt) % codeend
And I cant seem to get things to mesh correctly to get t to be returned as the value at that instant in time so that graph is returned. I've been scratching my head on this one for a while.
Best Answer