フィルターのクリア

why zero to the power of zero is not NaN?

11 ビュー (過去 30 日間)
Rafael Palacios
Rafael Palacios 2016 年 9 月 16 日
編集済み: Walter Roberson 2016 年 9 月 16 日
In Matlab, 0/0 returns NaN. However 0ˆ0 returns 1 instead of NaN.

回答 (2 件)

James Tursa
James Tursa 2016 年 9 月 16 日
編集済み: Walter Roberson 2016 年 9 月 16 日
Having 0^0 = 1 is a choice MATLAB made and is in agreement with many authors. But this can either be OK or not OK for your application, so if it makes a difference to you for your specific problem, you will need to check for this condition. More discussion can be found here:

mbonus
mbonus 2016 年 9 月 16 日
0^0 = 1, that's why MATLAB returns 1. "If f and g are real functions that vanish at the origin and are analytic at 0 (infinitely differentiable is not sufficient), then f(x)^g(x) approaches 1 as x approaches 0 from the right." http://mathforum.org/dr.math/faq/faq.0.to.0.power.html

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by