Why does this showing inf?
10 次查看(过去 30 天)
显示 更早的评论
Hi guys,
I appreciate it if some one can tell me what's the problem with my code that shows inf?
n=linspace(1,10^9,10);
y=exp(1);
e=(1+(1\n)).^n;
error=abs(y)-abs(e)/abs(y)
0 个评论
采纳的回答
Walter Roberson
2017-9-20
Look at the value of 1\n .
Are you certain that you intended to use Matrix Left Divide rather than ./ ?
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!