Plotting Complex Functions.
26 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1759664/image.png)
I intend to do a taylor series expansion at t=0. I would like to plot the coefficients of each Taylor term in the complex plane, using the surf function.
I tried Taylor(F) , Series (F) somewhere there is an error. The function is product of two gaussians, with two parameters mentioned above. This Gaussian contains other constants, Some are symbolic, while some have pre determined values.
Can some one help me out.
Thanks.
3 个评论
John D'Errico
about 19 hours 前
You have multiple constants in there with no value given. You say this yourself. You cannot plot something that is unkown.
At best, you can assign values to ALL of the constants, then plot to your hearts content.
David Goodmanson
about 3 hours 前
Since exp(-inf) = 0, I believe that F is well defined with F= 0 at t=0. A person might want to define it as a limit for increasingly large values of t, but that limit is 0. Unlike, say, sin(1/t) as t -->0.
回答(1 个)
David Goodmanson
about 3 hours 前
编辑:David Goodmanson
about 3 hours 前
Hello Sudharsana,
You can take the product of both functions to obtain either
f(t) = exp((-ar-ai)/(twC))
or
f(t) = exp((-ar-i*ai)/(twC))
depending on what is meant (per Torsten's comment). Either way you can reduce this to
f(t) = exp(-b/t)
for some (possibly complex) constant b. This function has an essential singularity at t = 0. The function and all its derivatives are zero at t = 0. Since the coefficients of a Taylor series about t = 0 are determined by the derivatives of f(t) at that point, this means that f(t) cannot be expanded in a Taylor series about t = 0.
Which doesn't mean that it can't be approximated. For example, using b = 1 for simplicity
t = 0:.001:4;
f = exp(-1./t);
c = polyfit(t,f,6)
f_fit = polyval(c,t);
I'm not advocating for polyfit which is anyway not a great idea for polynomials of large degree, and I am sure there are better fits but this is just one example.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!