Why does poly() not evalp
1 回表示 (過去 30 日間)
古いコメントを表示
I have an example:
evalp( poly( sqrt( 1-x^2 ), [x] ), x=cos(0.5) )
This gives (sqrt(1-x^2)) as the response.
The expected result is only given by
evalp( poly( sqrt( 1-x^2 ), [x] ), x=cos(0.5) ) | x=cos(0.5)
And evalp works as expected with simple expression like
evalp( poly( x, [x] ), x = 1 )
Is this a bug?
0 件のコメント
採用された回答
Walter Roberson
2011 年 6 月 15 日
sqrt( 1-x^2 ) is not a polynomial. evalp() is only for evaluating polynomials.
I am not familiar with the way you used "|" in your second expression. I looked through the Standard Library but I do not find any meaning defined for "|" . Could you give a reference on that?
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!