Symsum undefined function error

3 ビュー (過去 30 日間)
R.sch
R.sch 2016 年 10 月 19 日
コメント済み: R.sch 2017 年 10 月 30 日
I am trying to plot an equation with an infinite series using symsum.
I get this error when I try to plot it.
>> plot(x,.9-symsum((2./(n*3.14159)).*(sin(.1*n*3.14159))*(exp(-(n.^2)*(3.14159.^2)*x)),n,1,Inf));
Undefined function 'symsum' for input arguments of type 'double'.
Based on previous questions I thought it might be a problem of having the toolbox but that is in the right directory. Maybe I can't use symsum with my argument type, but is there another function I can use? Sum also didn't work (I got: Error using sum Dimension argument must be a positive integer scalar within indexing range.)

採用された回答

Walter Roberson
Walter Roberson 2016 年 10 月 19 日
First you need to
syms n
  3 件のコメント
Viviana-Irina Petre
Viviana-Irina Petre 2017 年 10 月 30 日
Hello, what does "syms n" means and what it does?
R.sch
R.sch 2017 年 10 月 30 日
It declares a symbolic variable named "n"
https://www.mathworks.com/help/symbolic/syms.html

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by