How to avoid a Logarithmic singularity in a plot or define it to have a nicer plot ?

6 次查看(过去 30 天)
Hi,
I am having a problem with the logarithmic singularity appearing in my plots. When I want to plot the contour/ezplot plot of a function due to the singularity there occurs a problem, and the plots appear too strange. Any suggestion please to avoid the singularity/branch cut or to get a nicer plot for the functions which have a logarithmic singularity or using the ezplot.
an example; if I want to have its contour plot for level zero or its ezplot, what would you suggest me?
contour( imag(1i*(4-x-1i*y).^(2)-32*log(1i*(4-x-1i*y))));
Thank you
  4 个评论
murat kara
murat kara 2015-12-21
Walter, thank you very much for the comment. The thing is that, in above plot for example, the picture near the singularity at 4, does not look right. Could you please run the below code? Then you will see that there is a line occurring on the real axis for the lower part, to connect the two lines I think, and I think this lower part should be like the upper part.
ezplot( 'imag(((1i*(x+1i*y-4).^(2))-12*log(4-(x+1i*y))))',[-14 14 -14 14]);

请先登录,再进行评论。

回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by