Plotting a function over an interval

1 次查看(过去 30 天)
Ali Baig
Ali Baig 2018-8-17
编辑: Torsten 2018-8-17
I am trying to plot a function in which one term is (2^(-1/a))*(1+x)^(1+1/a). When a is very small, for example a=10^-4 or even smaller, this term turns to NaN. How can I plot this function?
  9 个评论
Ali Baig
Ali Baig 2018-8-17
I am trying to plot for ''a'' up to 10^-6 and the simplification propsed by Hamming works up to this value.
Torsten
Torsten 2018-8-17
编辑:Torsten 2018-8-17
x=linspace(0,1,40);
a=1e-12;
y=(1+x).*((1+x)/2).^(1/a);
plot(x,y)
works for me.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by