why "symsum(sin(k*pi)*k,0,n)" not equal zero
4 ビュー (過去 30 日間)
古いコメントを表示
why "symsum(sin(k*pi)*k,0,n)" not equal zero?
0 件のコメント
回答 (3 件)
Walter Roberson
2014 年 2 月 23 日
symsum(sin(k*sym('pi'))*k,0,n)
Remember, "pi" in MATLAB is only a numeric approximation to the transcendental number; you need to use the transcendental number rather than the numeric approximation.
0 件のコメント
Paul
2014 年 2 月 23 日
I don't think Matlab recognizes that sin(pi)= 0, therefore it cant simplify further sin(pi*n)*(n/2 + 1/4). Just type sin(pi) and you will see you won't get 0. sind(180) does give 0 but sind doesn't support symbolic variables.
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!